Subject: Re: bug#15614: 24.3.50; conflict between quail and flyspell

From: Stefan Monnier <[email-masked]>
Date: Thu, 29 May 2014 12:43:29 -0400

> I do use the "french-alt-postfix" mode to handle post-fixed accents in
> French documents, and I use flyspell to prevent me from typos.
> Now let's say I want to type "là" (which is the French for "here" in
> English, but that not the point here), I am used to type:
>
>   <l><a><`>
>
> which worked nicely until a few weeks ago.
> Now I need to type:
>   <l><a><`><space>
> which gives me "là " (notice the tailing space here).

I installed the patch below into the `emacs-24' branch, which seems to
fix this problem (or at least, work around it).

        Stefan

=== modified file 'lisp/subr.el'
--- lisp/subr.el	2014-05-09 16:51:17 +0000
+++ lisp/subr.el	2014-05-29 16:25:25 +0000
@@ -2168,7 +2168,12 @@
     ;; FIXME: we should not read-event here at all, because it's much too
     ;; difficult to reliably "undo" a read-event by pushing it onto
     ;; unread-command-events.
-    (let ((read (read-event nil t seconds)))
+    ;; For bug#14782, we need read-event to do the keyboard-coding-system
+    ;; decoding (hence non-nil as second arg under POSIX ttys).
+    ;; For bug#15614, we need read-event not to inherit-input-method.
+    ;; So we temporarily suspend input-method-function.
+    (let ((read (let ((input-method-function nil))
+                  (read-event nil t seconds))))
       (or (null read)
 	  (progn
 	    ;; If last command was a prefix arg, e.g. C-u, push this event onto