aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorDaniel Pfeiffer <[email protected]>2004-11-03 21:55:28 +0000
committerDaniel Pfeiffer <[email protected]>2004-11-03 21:55:28 +0000
commit589f233e08f973b96acfc75b3c53157a807495f5 (patch)
tree941cb9c109c0cf5286ce66d0320a2538991dbf4c /lisp
parent6a36ed1468ed11338607d9213aa9cc25f10baa31 (diff)
(Buffer-menu-make-sort-button): Preserve point even when clicking from another window.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/buff-menu.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index da21f5336d..e980055d42 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)