help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pop up context menu (at point) with <menu> key rather than mouse


From: Eli Zaretskii
Subject: Re: Pop up context menu (at point) with <menu> key rather than mouse
Date: Fri, 09 Nov 2018 21:29:03 +0200

> From: "N. Jackson" <nljlistbox2@gmail.com>
> Date: Fri, 09 Nov 2018 14:19:50 -0500
> 
> I think what I need to move forward on this, is to know what function is
> run to display the menus popped up by C-mouse-3 (and by mouse-3 (when it
> pops up a menu at all)), I suppose I can find these functions by running
> Emacs under GDB, popping up a menu, halting Emacs in GDB, and displaying
> a backtrace, although I feel there must be a much easier way.
> 
> Does anyone have any information that might help with this?

>From mouse.el:

  ;; By binding these to down-going events, we let the user use the up-going
  ;; event to make the selection, saving a click.
  (global-set-key [C-down-mouse-1] 'mouse-buffer-menu)
  (if (not (eq system-type 'ms-dos))
      (global-set-key [S-down-mouse-1] 'mouse-appearance-menu))
  ;; C-down-mouse-2 is bound in facemenu.el.
  (global-set-key [C-down-mouse-3]
    `(menu-item ,(purecopy "Menu Bar") ignore
      :filter (lambda (_)
                (if (zerop (or (frame-parameter nil 'menu-bar-lines) 0))
                    (mouse-menu-bar-map)
                  (mouse-menu-major-mode-map)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]