]> code.delx.au - gnu-emacs/blobdiff - lisp/buff-menu.el
Change encoding to iso-2022-7bit and add coding: tag.
[gnu-emacs] / lisp / buff-menu.el
index 7beaf15fc226cc9309e2a8b32ea9e78fa2615522..8e1a3e692952ef2bc6d03f77be3bc7c104c9c515 100644 (file)
@@ -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)
@@ -484,14 +488,19 @@ in the selected frame."
   "Make the other window select this line's buffer.
 The current window remains selected."
   (interactive)
-  (display-buffer (Buffer-menu-buffer t)))
+  (let ((pop-up-windows t)
+       same-window-buffer-names
+       same-window-regexps)
+    (display-buffer (Buffer-menu-buffer t))))
 
 (defun Buffer-menu-2-window ()
   "Select this line's buffer, with previous buffer in second window."
   (interactive)
   (let ((buff (Buffer-menu-buffer t))
        (menu (current-buffer))
-       (pop-up-windows t))
+       (pop-up-windows t)
+       same-window-buffer-names
+       same-window-regexps)
     (delete-other-windows)
     (switch-to-buffer (other-buffer))
     (pop-to-buffer buff)