From 1a5ccd6f880f11603d554143a4066299343b54cf Mon Sep 17 00:00:00 2001 From: morioka Date: Tue, 27 Oct 1998 09:15:55 +0000 Subject: [PATCH] (cancel-undo-boundary): Switch definition by existence of variable `buffer-undo-list'. --- poe.el | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/poe.el b/poe.el index bd34bf3..67d2c58 100644 --- a/poe.el +++ b/poe.el @@ -474,13 +474,19 @@ as obsolete. [XEmacs emulating function]" ;;; @ MULE 2 emulation ;;; -(defun-maybe cancel-undo-boundary () - "Cancel undo boundary. [MULE 2.3 emulating function]" - (if (and (consp buffer-undo-list) - ;; if car is nil. - (null (car buffer-undo-list)) ) - (setq buffer-undo-list (cdr buffer-undo-list)) - )) +(if (boundp 'buffer-undo-list) + ;; for Emacs 19.7 or later + (defun-maybe cancel-undo-boundary () + "Cancel undo boundary. [MULE 2.3 emulating function]" + (if (and (consp buffer-undo-list) + ;; if car is nil. + (null (car buffer-undo-list))) + (setq buffer-undo-list (cdr buffer-undo-list)) + )) + ;; for anything older than Emacs 19.7. + (defun-maybe cancel-undo-boundary () + "Cancel undo boundary. [MULE 2.3 emulating function]") + ) ;;; @ end -- 1.7.10.4