GNU bug report logs -
#15993
24.3.50; doc of `set-temporary-overlay-map' - explain "used only once"
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Thu, 28 Nov 2013 20:39:02 UTC
Severity: minor
Found in version 24.3.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15993 in the body.
You can then email your comments to 15993 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15993
; Package
emacs
.
(Thu, 28 Nov 2013 20:39:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Drew Adams <drew.adams <at> oracle.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 28 Nov 2013 20:39:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
This pertains to both the Elisp manual and the doc string.
This function puts a keymap in place temporarily, and that keymap
overrides most other keymaps. The important question of what
"temporarily" means here is not answered by the doc. It says only
"Normally, MAP is used only once." A user is left to guess what
"used only once" means. Only one occurrence of what?
Just say that it is used only for the next key-sequence event, or
something similar. Somehow, state that it is (with null KEEP-PRED)
in effect only for the next event.
For *anything* that "sets" something for only a certain duration, e.g.,
until some state change, it is important to say what it is that causes
the setting to no longer be in effect.
It also would not hurt to either describe a typical use case or show a
simple example. The uses of this all seem to be similar, but it is
not obvious from the description alone what this function is for.
In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
of 2013-11-28 on MW7G474MYRXUPA
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
`configure --enable-checking 'CFLAGS=-O0 -g3' CPPFLAGS=-DGLYPH_DEBUG=1'
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15993
; Package
emacs
.
(Sat, 08 Feb 2014 03:09:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 15993 <at> debbugs.gnu.org (full text, mbox):
Drew Adams <drew.adams <at> oracle.com> writes:
> This pertains to both the Elisp manual and the doc string.
>
> This function puts a keymap in place temporarily, and that keymap
> overrides most other keymaps. The important question of what
> "temporarily" means here is not answered by the doc. It says only
> "Normally, MAP is used only once." A user is left to guess what
> "used only once" means. Only one occurrence of what?
The doc string now says
Set MAP as a temporary keymap taking precedence over other keymaps.
Normally, MAP is used only once, to look up the very next key.
However, if the optional argument KEEP-PRED is t, MAP stays
active if a key from MAP is used. KEEP-PRED can also be a
function of no arguments: if it returns non-nil, then MAP stays
active.
which I think is clear enough.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
bug closed, send any further explanations to
15993 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sat, 08 Feb 2014 03:09:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#15993
; Package
emacs
.
(Sat, 08 Feb 2014 23:01:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 15993 <at> debbugs.gnu.org (full text, mbox):
> > This pertains to both the Elisp manual and the doc string.
> >
> > This function puts a keymap in place temporarily, and that keymap
> > overrides most other keymaps. The important question of what
> > "temporarily" means here is not answered by the doc. It says only
> > "Normally, MAP is used only once." A user is left to guess what
> > "used only once" means. Only one occurrence of what?
>
> The doc string now says
>
> Set MAP as a temporary keymap taking precedence over other keymaps.
> Normally, MAP is used only once, to look up the very next key.
> However, if the optional argument KEEP-PRED is t, MAP stays
> active if a key from MAP is used. KEEP-PRED can also be a
> function of no arguments: if it returns non-nil, then MAP stays
> active.
>
> which I think is clear enough.
Yes, the bug was fixed. FYI, this was the text from the build
where I submitted the bug report:
,----
| set-temporary-overlay-map is a compiled Lisp function in `subr.el'.
|
| (set-temporary-overlay-map MAP &optional KEEP-PRED ON-EXIT)
|
| Set MAP as a temporary keymap taking precedence over most other keymaps.
| Note that this does NOT take precedence over the "overriding" maps
| `overriding-terminal-local-map' and `overriding-local-map' (or the
| `keymap' text property). Unlike those maps, if no match for a key is
| found in MAP, the normal key lookup sequence then continues.
|
| Normally, MAP is used only once. If the optional argument
| KEEP-PRED is t, MAP stays active if a key from MAP is used.
| KEEP-PRED can also be a function of no arguments: if it returns
| non-nil then MAP stays active.
|
| Optional ON-EXIT argument is a function that is called after the
| deactivation of MAP.
`----
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 09 Mar 2014 11:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 165 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.