From: Daniel Pfeiffer Date: Mon, 18 Oct 2004 20:45:52 +0000 (+0000) Subject: (Buffer-menu-make-sort-button) Make sorting by mouse-2 work from a different window. X-Git-Tag: ttn-vms-21-2-B4~4497 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c8d8f3225ec355dc134bf0af287f00c19c4d6d52;p=emacs.git (Buffer-menu-make-sort-button) Make sorting by mouse-2 work from a different window. --- diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index b00721e93ec..da21f5336d8 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el @@ -625,7 +625,9 @@ For more information, see the function `buffer-menu'." '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)))