unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* key-binding values
@ 2005-09-06 15:50 Drew Adams
  2005-09-06 16:26 ` Andreas Schwab
  0 siblings, 1 reply; 6+ messages in thread
From: Drew Adams @ 2005-09-06 15:50 UTC (permalink / raw)


Consider these two definitions:

 (defcustom my-key [?\C-\ ] "My key sequence.")
 (defcustom my-key  "\C- "  "My key sequence.")

`C-h v' then gives these values: [67108896] and "^@".

Is this as good as can be expected - is there no way to get something more
readable for [?\C-\ ]? Emacs users learn quickly to read "^@" as "control
@", and they also learn that this is equivalent to "control SPC", but
[67108896] is hard to read and digest.

Also, correct me if I'm wrong, but my understanding is that the form [?\C- ]
is generally preferred over the form "\C- ", for a key binding. If so, that
makes matters worse in cases like this.

This form is good:

 (defcustom my-key [(control ?\ )] "My key sequence.")

`C-h v' then gives [(control 32)], which is even clearer than "^@".

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

end of thread, other threads:[~2005-09-07  5:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-06 15:50 key-binding values Drew Adams
2005-09-06 16:26 ` Andreas Schwab
2005-09-06 17:15   ` Drew Adams
2005-09-06 22:14     ` Andreas Schwab
2005-09-06 22:51       ` Edward O'Connor
2005-09-07  5:05   ` Richard M. Stallman

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