emacs-devel
[Top][All Lists]
Advanced

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

Re: Non-ASCII chars in quail rules


From: Stefan Monnier
Subject: Re: Non-ASCII chars in quail rules
Date: Tue, 02 Sep 2014 22:23:54 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

> Load each in turn and set the input method to "testmode", and then
> try typing something like "<F19>Pd". When & is the prefix character,
> everything works as expected and you get a pound sign. When U+2384 is
> the character, it gets entered into the buffer and nothing otherwise
> happens.

But that's expected because of the restriction documented in the
docstring of input-method-function:

   It's called with one argument, a printing character that was just read.
   (That means a character with code 040...0176.)

The patch below lifts this restriction, after which your code seems
to work.


        Stefan


=== modified file 'src/keyboard.c'
--- src/keyboard.c      2014-08-27 10:51:21 +0000
+++ src/keyboard.c      2014-09-03 02:20:07 +0000
@@ -3048,7 +3048,7 @@
      save the echo area contents for it to refer to.  */
   if (INTEGERP (c)
       && ! NILP (Vinput_method_function)
-      && ' ' <= XINT (c) && XINT (c) < 256 && XINT (c) != 127)
+      && ' ' <= XINT (c) && CHARACTERP (c) && XINT (c) != 127)
     {
       previous_echo_area_message = Fcurrent_message ();
       Vinput_method_previous_message = previous_echo_area_message;
@@ -3078,7 +3078,7 @@
       /* Don't run the input method within a key sequence,
         after the first event of the key sequence.  */
       && NILP (prev_event)
-      && ' ' <= XINT (c) && XINT (c) < 256 && XINT (c) != 127)
+      && ' ' <= XINT (c) && CHARACTERP (c) && XINT (c) != 127)
     {
       Lisp_Object keys;
       ptrdiff_t key_count;




reply via email to

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