From 589f233e08f973b96acfc75b3c53157a807495f5 Mon Sep 17 00:00:00 2001 From: Daniel Pfeiffer Date: Wed, 3 Nov 2004 21:55:28 +0000 Subject: [PATCH] (Buffer-menu-make-sort-button): Preserve point even when clicking from another window. --- lisp/buff-menu.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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) -- 2.39.5