]> git.eshelyaron.com Git - emacs.git/commitdiff
(Buffer-menu-make-sort-button): Preserve point even when clicking from another window.
authorDaniel Pfeiffer <occitan@esperanto.org>
Wed, 3 Nov 2004 21:55:28 +0000 (21:55 +0000)
committerDaniel Pfeiffer <occitan@esperanto.org>
Wed, 3 Nov 2004 21:55:28 +0000 (21:55 +0000)
lisp/buff-menu.el

index da21f5336d8f2558d98e52dac3615ddb9069783d..e980055d422737c54a543ffc4395101b6b3dbf1d 100644 (file)
@@ -627,8 +627,9 @@ For more information, see the function `buffer-menu'."
                        (define-key map [header-line mouse-2]
                          `(lambda (e)
                             (interactive "e")
-                            (if e (set-buffer (window-buffer (posn-window (event-end e)))))
-                            (Buffer-menu-sort ,column)))
+                            (save-window-excursion
+                              (if e (mouse-select-window e))
+                              (Buffer-menu-sort ,column))))
                        map)))
 
 (defun list-buffers-noselect (&optional files-only)