From: Drew Adams <drew.adams@oracle.com>
To: 18092@debbugs.gnu.org
Subject: bug#18092: 24.4.50; doc string of `define-prefix-command'
Date: Wed, 23 Jul 2014 13:16:50 -0700 (PDT) [thread overview]
Message-ID: <b220b9a7-0488-4225-9ec2-205d9026086b@default> (raw)
In-Reply-To: <59128bf2-e1e4-4f8d-89da-f04a5c31950b@default>
Things are actually worse than that.
The notion of "prefix command" is not introduced or explained anywhere.
It is not in either the Emacs manual or the Elisp manual.
`define-prefix-command' has been around for a long time, but it is a
poorly chosen name. The symbol is NOT defined as a command or even
as a function (it is fboundp but not functionp or commandp).
This name is misleading and confusing.
The Elisp manual speaks better of `define-prefix-command', by saying
that it "prepares SYMBOL for use as a prefix key's binding" - nothing
about "prefix command". Such wording should be used also for the doc
string.
It would even be good to rename the function (keeping
`define-prefix-command' as a deprecated alias). Maybe something like
`prepare-symbol-for-prefix-key'.
The doc should also make clear that the value it puts in the function
cell is a new, empty keymap. Thus, if you do
(define-prefix-command 'foo), and then you define keys in that keymap,
and then you do (define-prefix-command 'foo) again, the keys you
bound earlier are lost (since a new map is now used for foo).
next prev parent reply other threads:[~2014-07-23 20:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-23 19:54 bug#18092: 24.4.50; doc string of `define-prefix-command' Drew Adams
2014-07-23 20:16 ` Drew Adams [this message]
2016-04-29 22:54 ` Lars Ingebrigtsen
2016-04-29 22:51 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b220b9a7-0488-4225-9ec2-205d9026086b@default \
--to=drew.adams@oracle.com \
--cc=18092@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.