From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Non-ASCII chars in quail rules Date: Tue, 02 Sep 2014 22:23:54 -0400 Message-ID: References: <20140829101804.4c904346@jabberwock.cb.piermont.com> <20140830184844.797d7340@jabberwock.cb.piermont.com> <20140831100035.6487ff7f@jabberwock.cb.piermont.com> <20140831172949.7ba54d1a@jabberwock.cb.piermont.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1409711067 16145 80.91.229.3 (3 Sep 2014 02:24:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Sep 2014 02:24:27 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Perry E. Metzger" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 03 04:24:19 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XP0F8-0003Wg-Nk for ged-emacs-devel@m.gmane.org; Wed, 03 Sep 2014 04:24:18 +0200 Original-Received: from localhost ([::1]:41079 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP0F8-0001OY-9v for ged-emacs-devel@m.gmane.org; Tue, 02 Sep 2014 22:24:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP0Ex-0001Lu-FG for emacs-devel@gnu.org; Tue, 02 Sep 2014 22:24:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XP0En-0006lR-P7 for emacs-devel@gnu.org; Tue, 02 Sep 2014 22:24:07 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:53234) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XP0En-0006lL-JX for emacs-devel@gnu.org; Tue, 02 Sep 2014 22:23:57 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id s832Nt1Y027539; Tue, 2 Sep 2014 22:23:55 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id AE2C66308B; Tue, 2 Sep 2014 22:23:54 -0400 (EDT) In-Reply-To: <20140831172949.7ba54d1a@jabberwock.cb.piermont.com> (Perry E. Metzger's message of "Sun, 31 Aug 2014 17:29:49 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5052=0 X-NAI-Spam-Version: 2.3.0.9378 : core <5052> : inlines <1229> : streams <1280001> : uri <1809699> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:173974 Archived-At: > Load each in turn and set the input method to "testmode", and then > try typing something like "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;