]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix "C-u" when an input method is active
authorJoakim Jalap <joakim.jalap@fastmail.com>
Sat, 13 Aug 2016 09:26:27 +0000 (12:26 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 13 Aug 2016 09:26:27 +0000 (12:26 +0300)
* lisp/international/quail.el (quail-input-method): Defer to the
input method iff 'overriding-terminal-local-map' is
'universal-argument-map' and the given key has no binding there.
(Bug#22958)

lisp/international/quail.el

index f5e390278ca00e759277184d69598ff6a44dd94d..320d783d4108065c8442f4c21fed87aeb4cbd836 100644 (file)
@@ -1333,7 +1333,15 @@ If STR has `advice' text property, append the following special event:
 
 (defun quail-input-method (key)
   (if (or buffer-read-only
-         overriding-terminal-local-map
+         (and overriding-terminal-local-map
+               ;; If the overriding map is `universal-argument-map', that
+               ;; must mean the user has pressed 'C-u KEY'.  If KEY has a
+               ;; binding in `universal-argument-map' just return
+               ;; (list KEY), otherwise act as if there was no
+               ;; overriding map.
+               (or (not (eq (cadr overriding-terminal-local-map)
+                            universal-argument-map))
+                   (lookup-key overriding-terminal-local-map (vector key))))
          overriding-local-map)
       (list key)
     (quail-setup-overlays (quail-conversion-keymap))