emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

`key-binding' and XEmacs-style events


From: Stuart D. Herring
Subject: `key-binding' and XEmacs-style events
Date: Wed, 28 Feb 2007 14:57:53 -0800 (PST)
User-agent: SquirrelMail/1.4.8-2.el3.7lanl

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]