(cancel-undo-boundary): Switch definition by existence of variable
authormorioka <morioka>
Tue, 27 Oct 1998 09:15:55 +0000 (09:15 +0000)
committermorioka <morioka>
Tue, 27 Oct 1998 09:15:55 +0000 (09:15 +0000)
`buffer-undo-list'.

poe.el

diff --git a/poe.el b/poe.el
index bd34bf3..67d2c58 100644 (file)
--- 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