emacs-devel
[Top][All Lists]
Advanced

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

Re: C-l while in menu?


From: Stefan Monnier
Subject: Re: C-l while in menu?
Date: Tue, 23 Apr 2002 10:11:08 -0400

> BTW, I think most of this logic be implemented in lisp if we
> just had two built-in functions like
> 
>   (menu-bar-item-matching-p key) -> returns t if menu starting with KEY exists
>   (open-menu-bar-item-matching key) -> opens that menu.
> 
> Then, in a menu-accell minor mode, we could have code and bindings like
> 
>   (defun menu-accell-check-item ()
>     (menu-bar-item-matching-p (this-command-key))
> 
>   (defun menu-accell-open-item ()
>     (interactive)
>     (open-menu-bar-item-matching (this-command-key)))
> 
>   (defcustom menu-accell-modifiers '(meta))
> 
>   ... for KEY in ?a to ?z do ...
>   (define-key menu-accell-map
>     (vector (append menu-accell-modifiers (list key)))  ;; eg M-f
>     '(menu-item "accell" menu-accell-open-item
>                 :filter menu-accell-check-item))

Looks perfect.  Could be just a minor mode.


        Stefan




reply via email to

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