emacs-devel
[Top][All Lists]
Advanced

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

Re: `key-binding' and XEmacs-style events


From: Stuart D. Herring
Subject: Re: `key-binding' and XEmacs-style events
Date: Thu, 1 Mar 2007 15:52:13 -0800 (PST)
User-agent: SquirrelMail/1.4.8-2.el3.7lanl

>> We're talking about going the other way -- supporting (key-binding
>> [(?a)])
>> in Emacs
>
> Yes, but we don't have to fix it.
>
> If you want to write portable code, simply use the GNU Emacs format [?a],
> as this is also supported by XEmacs.

What I am actually interested in can be seen at
http://www.emacswiki.org/cgi-bin/wiki/unbound.el: this code mechanically
manipulates keystrokes.  By far the easiest way to do this is to generate
XEmacs lists with modifiers and base events, rather than having to
generate the symbol 'C-end and the low-ASCII ?\C-a and the high-bit-set
?\C-` with separate rules.  Then the natural way of representing an
unmodified key is a list containing 0 modifiers and the base event, but
that fails (for `key-binding' only; `lookup-key' and `define-key' accept
it) because it doesn't happen to begin with a symbol.

Obviously it is possible to detect the case of an unmodified event and
emit a non-list for it, but it makes the code needlessly more complex.

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]