Function: mouse-buffer-menu

mouse-buffer-menu is an interactive and byte-compiled function defined in mouse.el.gz.

Signature

(mouse-buffer-menu EVENT)

Documentation

Pop up a menu of buffers for selection with the mouse.

This switches buffers in the window that you clicked on, and selects that window.

View in manual

Probably introduced at or before Emacs version 25.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/mouse.el.gz
(defun mouse-buffer-menu (event)
  "Pop up a menu of buffers for selection with the mouse.
This switches buffers in the window that you clicked on,
and selects that window."
  (interactive "e")
  (mouse-minibuffer-check event)
  (let ((buf (x-popup-menu event (mouse-buffer-menu-map)))
        (window (posn-window (event-start event))))
    (when buf
      (select-window
       (if (framep window) (frame-selected-window window)
         window))
      (switch-to-buffer buf))))