changeset 57580:55e41a15ee14

(Buffer-menu-make-sort-button) Make sorting by mouse-2 work from a different window.
author Daniel Pfeiffer <occitan@esperanto.org>
date Mon, 18 Oct 2004 20:45:52 +0000
parents 492f1d1d00f2
children 645f020dcc8a
files lisp/buff-menu.el
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/buff-menu.el	Mon Oct 18 20:04:17 2004 +0000
+++ b/lisp/buff-menu.el	Mon Oct 18 20:45:52 2004 +0000
@@ -625,7 +625,9 @@
 	      'mouse-face 'highlight
 	      'keymap (let ((map (make-sparse-keymap)))
 			(define-key map [header-line mouse-2]
-			  `(lambda () (interactive)
+			  `(lambda (e)
+			     (interactive "e")
+			     (if e (set-buffer (window-buffer (posn-window (event-end e)))))
 			     (Buffer-menu-sort ,column)))
 			map)))