Function: dframe-hack-buffer-menu

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

Signature

(dframe-hack-buffer-menu E)

Documentation

Control mouse 1 is buffer menu.

This hack overrides it so that the right thing happens in the main Emacs frame, not in the dedicated frame. Argument E is the event causing this activity.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/dframe.el.gz
(defun dframe-hack-buffer-menu (_e)
  "Control mouse 1 is buffer menu.
This hack overrides it so that the right thing happens in the main
Emacs frame, not in the dedicated frame.
Argument E is the event causing this activity."
  (interactive "e")
  (let ((fn (lookup-key global-map [C-down-mouse-1]))
	(oldbuff (current-buffer))
	(newbuff nil))
    (unwind-protect
	(save-excursion
	  (set-window-dedicated-p (selected-window) nil)
	  (call-interactively fn)
	  (setq newbuff (current-buffer)))
      (switch-to-buffer oldbuff)
      (set-window-dedicated-p (selected-window) t))
    (if (not (eq newbuff oldbuff))
	(dframe-with-attached-buffer
	 (switch-to-buffer newbuff)))))