unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 14257@debbugs.gnu.org
Subject: bug#14257: 24.3.50; (elisp) `Modifying Menus' - clarify second example
Date: Wed, 20 Jan 2021 04:19:14 +0100	[thread overview]
Message-ID: <87a6t447nx.fsf@gnus.org> (raw)
In-Reply-To: <E12F73B0EEC24EEB973EAE4F264954F3@us.oracle.com> (Drew Adams's message of "Wed, 24 Apr 2013 09:21:08 -0700")

"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	other threads:[~2021-01-20  3:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-24 16:21 bug#14257: 24.3.50; (elisp) `Modifying Menus' - clarify second example Drew Adams
2021-01-20  3:19 ` Lars Ingebrigtsen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a6t447nx.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=14257@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).