From: Joakim Jalap Date: Sat, 13 Aug 2016 09:26:27 +0000 (+0300) Subject: Fix "C-u" when an input method is active X-Git-Tag: emacs-26.0.90~1745 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c1021ba910efac334027ad03ff6aed64306fad3c;p=emacs.git Fix "C-u" when an input method is active * 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) --- diff --git a/lisp/international/quail.el b/lisp/international/quail.el index f5e390278ca..320d783d410 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -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))