changeset 59092:49971daa80c5

(Buffer-menu-revert-function): Clear out undo info before reverting and disable undo recording while reverting.
author Luc Teirlinck <teirllm@auburn.edu>
date Mon, 27 Dec 2004 05:17:09 +0000
parents 0e949a8f0be2
children c158bab0ae07
files lisp/buff-menu.el
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/buff-menu.el	Mon Dec 27 05:11:37 2004 +0000
+++ b/lisp/buff-menu.el	Mon Dec 27 05:17:09 2004 +0000
@@ -198,11 +198,15 @@
   (revert-buffer))
 
 (defun Buffer-menu-revert-function (ignore1 ignore2)
+  (or (eq buffer-undo-list t)
+      (setq buffer-undo-list nil))
   ;; We can not use save-excursion here.  The buffer gets erased.
   (let ((ocol (current-column))
 	(oline (progn (move-to-column 4)
 		      (get-text-property (point) 'buffer)))
-	(prop (point-min)))
+	(prop (point-min))
+	;; do not make undo records for the reversion.
+	(buffer-undo-list t))
     (list-buffers-noselect Buffer-menu-files-only)
     (while (setq prop (next-single-property-change prop 'buffer))
       (when (eq (get-text-property prop 'buffer) oline)