[Top][All Lists]

[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 14:27:55 -0800 (PST)
User-agent: SquirrelMail/1.4.8-2.el3.7lanl

>>     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 agree.  Would someone please fix this and ack?
> AFAIK, [?a] works in XEmacs as well.  It's only when you have modifiers
> that
> the Emacs syntax is not understood by XEmacs.

We're talking about going the other way -- supporting (key-binding [(?a)])
in Emacs (I don't know what XEmacs thinks of event-lists with no
modifiers).  The simplest fix seems to be to move the check that the list
is at least two long before the code that uses its first element as a

*** keymap.c.~1.345.~   2007-02-08 09:45:05.000000000 -0700
--- keymap.c    2007-03-01 15:26:32.000000000 -0700
*** 1612,1621 ****

        /* We are not interested in locations without event data */

!       if (EVENT_HAS_PARAMETERS (event))
          Lisp_Object kind = EVENT_HEAD_KIND (EVENT_HEAD (event));
!         if (CONSP (XCDR (event)) && EQ (kind, Qmouse_click))
            position = EVENT_START (event);
--- 1612,1621 ----

        /* We are not interested in locations without event data */

!       if (EVENT_HAS_PARAMETERS (event) && CONSP (XCDR (event)))
          Lisp_Object kind = EVENT_HEAD_KIND (EVENT_HEAD (event));
!         if (EQ (kind, Qmouse_click))
            position = EVENT_START (event);

That will still die on (key-binding [(?a ?b)]), but that's meaningless


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

reply via email to

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