From: "Drew Adams" <drew.adams@oracle.com>
To: 14257@debbugs.gnu.org
Subject: bug#14257: 24.3.50; (elisp) `Modifying Menus' - clarify second example
Date: Wed, 24 Apr 2013 09:21:08 -0700 [thread overview]
Message-ID: <E12F73B0EEC24EEB973EAE4F264954F3@us.oracle.com> (raw)
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. And the doc string has been updated to
no longer say this:
"KEY must contain just one event type--that is to say, it must be a
string or vector of length 1."
If the example still has a purpose (some other purpose), then consider
mentioning it.
And it would at least help to mention that the `lookup-key' sexp in the
example returns a keymap, not a key. Without knowing that, the second
example would not make much sense (hence, some readers will guess it,
but it would still help to mention it).
In GNU Emacs 24.3.50.1 (i386-mingw-nt5.1.2600)
of 2013-04-17 on ODIEONE
Bzr revision: 112320 monnier@iro.umontreal.ca-20130418001233-g6wsqi5bpq2hsd0k
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
`configure --with-gcc (4.7) --no-opt --enable-checking --cflags
-IC:/Devel/emacs/build/include --ldflags -LC:/Devel/emacs/build/lib'
next reply other threads:[~2013-04-24 16:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-24 16:21 Drew Adams [this message]
2021-01-20 3:19 ` bug#14257: 24.3.50; (elisp) `Modifying Menus' - clarify second example Lars Ingebrigtsen
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=E12F73B0EEC24EEB973EAE4F264954F3@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=14257@debbugs.gnu.org \
/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).