diff options
| author | Luc Teirlinck <teirllm@auburn.edu> | 2004-12-27 05:17:09 +0000 |
|---|---|---|
| committer | Luc Teirlinck <teirllm@auburn.edu> | 2004-12-27 05:17:09 +0000 |
| commit | fda73b4587f9049dd7b7b39553366fe120957b3c (patch) | |
| tree | 4e34b8c1ec074947da98e53575c0ee853c1ef0d8 /lisp/buff-menu.el | |
| parent | 4f38ed98eb490a3ee9d1c017b9f95fe13b95dae8 (diff) | |
| download | emacs-fda73b4587f9049dd7b7b39553366fe120957b3c.tar.gz | |
(Buffer-menu-revert-function): Clear out undo info before reverting
and disable undo recording while reverting.
Diffstat (limited to 'lisp/buff-menu.el')
| -rw-r--r-- | lisp/buff-menu.el | 6 |
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. (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) |
