unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Docstring for define-key
@ 2003-02-19 16:31 Kai Großjohann
  2003-02-19 22:18 ` Kevin Rodgers
  2003-02-20 18:21 ` Richard Stallman
  0 siblings, 2 replies; 12+ messages in thread
From: Kai Großjohann @ 2003-02-19 16:31 UTC (permalink / raw)


The docstring for define-key says:

    If KEYMAP is a sparse keymap, the pair binding KEY to DEF is added at
    the front of KEYMAP.

When reading this, one could think that executing the same define-key
statement multiple times makes the KEYMAP grow.  However, this is not
the case.  Glancing at the code, I see that it seems to alter the old
binding, if one is already present.  So one possibility to change it
is like this:

    If KEYMAP is a sparse keymap with a binding for KEY, the existing
    binding is altered.  If there is no binding for KEY, the new pair
    binding KEY to DEF is added at the front of KEYMAP.

The wording is not very good, I think.

Suggestions?  Opinions?

Kudos to David Kastrup for bringing this up.
-- 
A turnip curses Elvis

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2003-02-24 16:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-19 16:31 Docstring for define-key Kai Großjohann
2003-02-19 22:18 ` Kevin Rodgers
2003-02-20 18:21 ` Richard Stallman
2003-02-20 19:58   ` Kai Großjohann
2003-02-21  7:39     ` Juanma Barranquero
2003-02-21 10:53       ` Kim F. Storm
2003-02-21 10:34         ` Juanma Barranquero
2003-02-22 17:53           ` Richard Stallman
2003-02-22 20:40             ` Stefan Monnier
2003-02-24 16:37               ` Richard Stallman
2003-02-21 14:36         ` Stefan Monnier
2003-02-21 16:38         ` Kai Großjohann

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).