unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* doc of prompt change with minor mode for read-key-sequence?
@ 2006-09-12 16:27 Drew Adams
  2006-09-13 15:10 ` Richard Stallman
  0 siblings, 1 reply; 12+ messages in thread
From: Drew Adams @ 2006-09-12 16:27 UTC (permalink / raw)


I may not be characterizing this 100% correctly, but perhaps this will help
someone knowledgeable to understand.

I have this:

;; Make [pause] key be a synonym for `C-x 8' (compose key).
(define-key key-translation-map [pause]
  (lookup-key key-translation-map "\C-x8"))

I also have a minor mode named "Foo".

When I do `C-h k' without the minor mode active, and hit the [pause] key,
the prompt remains "Describe key: " (that is, I see "Describe key: pause-").
When I do the same thing with the minor mode active, the prompt changes to
"Foo: " (and there is no "pause-" to indicate the prefix).

It took me quite a while to discover where this second prompt was coming
from. Because the translation happens at a low level, I couldn't figure out
a way to debug it. By experimenting and searching source code, I found that
"Foo: " comes from the name of the minor-mode keymap: (make-sparse-keymap
"Foo"). (I don't know where the ": " is appended or in what code that takes
place.)

Questions:

1) Why does this happen? What is the purpose of the prompt change? Why
doesn't "pause-" appear, as it does without the minor mode?

2) What are users to understand by this? Should the prompt instead say at
least "Foo mode: " perhaps, to at least let users know what "Foo" refers to?

3) Shouldn't this be documented somewhere, especially since it is so
difficult to find/debug (being a low-level translation)?

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

end of thread, other threads:[~2006-09-22 19:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-12 16:27 doc of prompt change with minor mode for read-key-sequence? Drew Adams
2006-09-13 15:10 ` Richard Stallman
2006-09-13 15:42   ` Drew Adams
2006-09-13 16:45     ` Stefan Monnier
2006-09-13 17:19       ` Drew Adams
2006-09-13 17:58         ` Stefan Monnier
2006-09-14  2:34         ` Richard Stallman
2006-09-14 15:09           ` Drew Adams
2006-09-18 14:58             ` Richard Stallman
2006-09-18 15:38               ` Drew Adams
2006-09-18 23:39                 ` Richard Stallman
2006-09-22 19:21         ` Stefan Monnier

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