* Incomplete function documentation for map-keymap and map-keymap strangeness
@ 2007-07-11 20:46 David Byers
0 siblings, 0 replies; only message in thread
From: David Byers @ 2007-07-11 20:46 UTC (permalink / raw)
To: bug-gnu-emacs
Please describe exactly what actions triggered the bug and the precise
symptoms of the bug:
Two related issues in Gnu Emacs 22.1:
First issue:
The function documentation (C-h f) for map-keymap in Emacs 22.1 states
that the function takes two arguments, FUNCTION and KEYMAP, when in
fact it takes three, FUNCTION, KEYMAP and optional SORT-FIRST.
The SORT-FIRST parameter should be included in the documentation.
Second issue:
When passing t in SORT-FIRST, Fmap_keymap calls map-keymap-internal
(Lisp code), which binds the variable "list". Thus, if the FUNCTION
passed to map-keymap attempts to access the dynamically bound variable
"list", it will in fact access the variable internal to
map-keymap-internal. Try this, for example:
(let (list)
(map-keymap
(lambda (event binding) (setq list (cons event list)))
(current-local-map) t)
list)
In lisp interaction mode this should return a short list of integers.
Remove the t and it does. Change the variable name from list to klist
and it does.
I think that map-keymap-internal should be modified to either not bind
anything in the environment of FUNCTION (at least not anything that
FUNCTION might use, and "list" is far too generic), or the
documentation of map-keymap should mention this issue.
In GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600)
of 2007-06-02 on RELEASE
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags
-Ic:/gnuwin32/include'
--
David Byers.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-07-11 20:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-11 20:46 Incomplete function documentation for map-keymap and map-keymap strangeness David Byers
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.