Commit fda73b45 authored by Luc Teirlinck's avatar Luc Teirlinck
Browse files

(Buffer-menu-revert-function): Clear out undo info before reverting

and disable undo recording while reverting.
parent 4f38ed98
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment