From: Daniel Pfeiffer Date: Wed, 3 Nov 2004 21:55:28 +0000 (+0000) Subject: (Buffer-menu-make-sort-button): Preserve point even when clicking from another window. X-Git-Tag: ttn-vms-21-2-B4~4210 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=589f233e08f973b96acfc75b3c53157a807495f5;p=emacs.git (Buffer-menu-make-sort-button): Preserve point even when clicking from another window. --- diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index da21f5336d8..e980055d422 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el @@ -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)