From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: "Perry E. Metzger" <perry@piermont.com>
Cc: emacs-devel@gnu.org
Subject: Re: Non-ASCII chars in quail rules
Date: Tue, 02 Sep 2014 22:23:54 -0400 [thread overview]
Message-ID: <jwvmwah1myr.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20140831172949.7ba54d1a@jabberwock.cb.piermont.com> (Perry E. Metzger's message of "Sun, 31 Aug 2014 17:29:49 -0400")
> 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;
next prev parent reply other threads:[~2014-09-03 2:23 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-29 14:18 Non-ASCII chars in quail rules Perry E. Metzger
2014-08-30 1:13 ` Stefan Monnier
2014-08-30 22:48 ` Perry E. Metzger
2014-08-31 12:38 ` Stefan Monnier
2014-08-31 14:00 ` Perry E. Metzger
2014-08-31 21:29 ` Perry E. Metzger
2014-09-03 2:23 ` Stefan Monnier [this message]
2014-09-03 11:43 ` Perry E. Metzger
2014-09-03 13:19 ` Stefan Monnier
2014-09-03 21:59 ` Perry E. Metzger
2014-09-04 0:02 ` Stephen J. Turnbull
2014-09-04 13:57 ` Perry E. Metzger
2014-09-04 14:17 ` Stephen J. Turnbull
2014-09-04 15:20 ` Perry E. Metzger
2014-09-04 15:37 ` Eli Zaretskii
2014-09-04 22:52 ` Stephen J. Turnbull
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvmwah1myr.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=perry@piermont.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.