aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Teirlinck2004-12-27 05:17:09 +0000
committerLuc Teirlinck2004-12-27 05:17:09 +0000
commitfda73b4587f9049dd7b7b39553366fe120957b3c (patch)
tree4e34b8c1ec074947da98e53575c0ee853c1ef0d8
parent4f38ed98eb490a3ee9d1c017b9f95fe13b95dae8 (diff)
downloademacs-fda73b4587f9049dd7b7b39553366fe120957b3c.tar.gz
emacs-fda73b4587f9049dd7b7b39553366fe120957b3c.zip
(Buffer-menu-revert-function): Clear out undo info before reverting
and disable undo recording while reverting.
-rw-r--r--lisp/buff-menu.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index 1c3fa704041..8e1a3e69295 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -198,11 +198,15 @@ Letters do not insert themselves; instead, they are commands.
198 (revert-buffer)) 198 (revert-buffer))
199 199
200(defun Buffer-menu-revert-function (ignore1 ignore2) 200(defun Buffer-menu-revert-function (ignore1 ignore2)
201 (or (eq buffer-undo-list t)
202 (setq buffer-undo-list nil))
201 ;; We can not use save-excursion here. The buffer gets erased. 203 ;; We can not use save-excursion here. The buffer gets erased.
202 (let ((ocol (current-column)) 204 (let ((ocol (current-column))
203 (oline (progn (move-to-column 4) 205 (oline (progn (move-to-column 4)
204 (get-text-property (point) 'buffer))) 206 (get-text-property (point) 'buffer)))
205 (prop (point-min))) 207 (prop (point-min))
208 ;; do not make undo records for the reversion.
209 (buffer-undo-list t))
206 (list-buffers-noselect Buffer-menu-files-only) 210 (list-buffers-noselect Buffer-menu-files-only)
207 (while (setq prop (next-single-property-change prop 'buffer)) 211 (while (setq prop (next-single-property-change prop 'buffer))
208 (when (eq (get-text-property prop 'buffer) oline) 212 (when (eq (get-text-property prop 'buffer) oline)