Commit 3c59c255 authored by Karl Heuer's avatar Karl Heuer
Browse files

(Electric-buffer-menu-mouse-select): New function.

(electric-buffer-menu-mode-map): Bind it to mouse-2.
parent a004e502
......@@ -194,6 +194,7 @@ electric-buffer-menu-mode-hook if it is non-nil."
(define-key map "\e\C-v" 'scroll-other-window)
(define-key map "\e>" 'end-of-buffer)
(define-key map "\e<" 'beginning-of-buffer)
(define-key map [mouse-2] 'Electric-buffer-menu-mouse-select)
(setq electric-buffer-menu-mode-map map)))
(defun Electric-buffer-menu-exit ()
......@@ -212,6 +213,13 @@ Selects buffer at point and displays buffers marked \">\" in other windows."
(interactive)
(throw 'electric-buffer-menu-select (point)))
(defun Electric-buffer-menu-mouse-select (event)
(interactive "e")
(select-window (posn-window (event-end event)))
(set-buffer (window-buffer (selected-window)))
(goto-char (posn-point (event-end event)))
(throw 'electric-buffer-menu-select (point)))
(defun Electric-buffer-menu-quit ()
"Leave Electric Buffer Menu, restoring previous window configuration.
Does not execute select, save, or delete commands."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment