ECB context menu in Aquamacs

一世执手 提交于 2019-12-12 01:59:56

问题


ECB (Emacs Code Browser) has context menu to add file, delete file etc. The context menu is opened when clicking right mouse button.

The problem is Aquamacs intercepts that mouse button event. When we click right mouse button in Aquamacs, it opens its own context menu. (In the Emacs downloaded from emacsformacosx.com, the context menu is opened correctly.)

How to open ECB context menu in Aquamacs? Is there a way to disable Aquamacs default context menu? Or is there a way to tell ECB to use other way to open its context menu?


回答1:


Answers from the mailing list of Aquamacs:

1.

Pretty much all key bindings in Aquamacs are bound in osx-key-mode-map (see Aquamacs FAQ). The mouse button bindings aren't any different.

Press C-h k, then the right mouse button (over an Aquamacs window). This should bring up a help screen that explains that this key is called `down-mouse-3', and that it is bound to a function described as this:

(osx-key-mode-down-mouse-3 EVENT &optional PREFIX)

Activate context menu, when osx-key-mode-mouse-3-behavior' is set toaquamacs-popup-context-menu' or nil

Looking up the documentation for this customization variable doesn't bring up anything useful, but we can undo the key binding (see Aquamacs FAQ, probably) using define-key:

(define-key osx-key-mode-map [down-mouse-3] nil)

2.

There is a second approach in place to return mouse-3 to its vanilla Emacs behavior: In the Aquamacs help/manual, section 4.3 "Customizing Aquamacs behavior", under "Want some GNU Emacs 23 behavior back?" there is a list of Aquamacs-specific settings that can be customized, including "OS X Key Mode Mouse-3 Behavior". Try customizing that setting as described in the help -- that may allow ECB to behave as in vanilla Emacs.



来源:https://stackoverflow.com/questions/7541693/ecb-context-menu-in-aquamacs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!