all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* `key-binding' and XEmacs-style events
@ 2007-02-28 22:57 Stuart D. Herring
  2007-03-01  8:14 ` Richard Stallman
  0 siblings, 1 reply; 17+ messages in thread
From: Stuart D. Herring @ 2007-02-28 22:57 UTC (permalink / raw)
  To: emacs-devel

I have noticed, when writing some automatic key-generation code, that
(key-binding [(?a)]) (or any other character) yields a type error because
?a is not a symbol.  The problem is that at keymap.c:1615, if the
function's argument is a vector and its first element is a cons, it is
assumed that the element is a mouse-like event which is a list started by
a symbol.  This does no particular harm for (key-binding [(control ?a)])
because 'control is merely discovered to have no interesting properties as
an event symbol, but it's a problem in the trivial one-character case.

Obviously (key-binding [?a]) works just as well, but in order to write
code that flexibly manipulates keystrokes it would be nice if the XEmacs
syntax could always be used even in degenerate cases.  I don't claim to
understand events very well, so perhaps I am alone in this opinion, but
this strikes me as a bug.  Thoughts?

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.

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

end of thread, other threads:[~2007-03-06 17:06 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-28 22:57 `key-binding' and XEmacs-style events Stuart D. Herring
2007-03-01  8:14 ` Richard Stallman
2007-03-01 15:19   ` Stefan Monnier
2007-03-01 22:27     ` Stuart D. Herring
2007-03-01 23:35       ` Kim F. Storm
2007-03-01 23:52         ` Stuart D. Herring
2007-03-02  8:31           ` David Kastrup
2007-03-04  6:13             ` Stuart D. Herring
2007-03-02  8:26       ` Richard Stallman
2007-03-02  8:46         ` David Kastrup
2007-03-02 23:46           ` Richard Stallman
2007-03-03  7:40             ` David Kastrup
2007-03-04  2:00               ` Richard Stallman
2007-03-04  6:27                 ` Stuart D. Herring
2007-03-06 17:06           ` Stuart D. Herring
2007-03-02  8:28       ` David Kastrup
2007-03-02  3:28     ` Richard Stallman

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.