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

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

bug#14257: 24.3.50; (elisp) `Modifying Menus' - clarify second example


From: Lars Ingebrigtsen
Subject: bug#14257: 24.3.50; (elisp) `Modifying Menus' - clarify second example
Date: Wed, 20 Jan 2021 04:19:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

"Drew Adams" <drew.adams@oracle.com> writes:

> It might help if some motivation were given for the second example:
>
>  (define-key-after
>    (lookup-key shell-mode-map [menu-bar signals])
>    [work] '("Work" . work-command) 'break)
>
> My guess is that that example was added to tell users how to deal with
> the error that used to be raised if you used something like this:
>
>  (define-key-after minibuffer-local-completion-map
>    [menu-bar minibuf foo]
>    '(menu-item "Foo" foo) 'quit)
>
> Instead of this:
>
>  (define-key-after (lookup-key minibuffer-local-completion-map
>                                [menu-bar minibuf])
>    [foo]
>    '(menu-item "Foo" foo) 'quit)
>
> That error is no longer raised.

I've now altered the second example to be more like the first example in
Emacs 28.  It's perhaps useful to illustrate the other syntax, too, but
the first syntax is to be encouraged, I guess.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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