From: morioka Date: Tue, 27 Oct 1998 09:15:55 +0000 (+0000) Subject: (cancel-undo-boundary): Switch definition by existence of variable X-Git-Tag: apel-9_8~9 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a5ccd6f880f11603d554143a4066299343b54cf;p=elisp%2Fapel.git (cancel-undo-boundary): Switch definition by existence of variable `buffer-undo-list'. --- 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