]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/isearch.el (isearch-reread-key-sequence-naturally): Use non-nil
authorJuri Linkov <juri@jurta.org>
Wed, 28 Aug 2013 16:39:51 +0000 (19:39 +0300)
committerJuri Linkov <juri@jurta.org>
Wed, 28 Aug 2013 16:39:51 +0000 (19:39 +0300)
arg DONT-DOWNCASE-LAST of `read-key-sequence'.
(isearch-other-meta-char): Handle an undefined shifted printing
character by downshifting it.

Fixes: debbugs:15200
lisp/ChangeLog
lisp/isearch.el

index efd6d7b3fac4da36e740d4445dd3ce862eaee227..0a07d90dd8fa7fac73dc76e4d5cb5f46cddbc4f7 100644 (file)
@@ -1,3 +1,10 @@
+2013-08-28  Juri Linkov  <juri@jurta.org>
+
+       * isearch.el (isearch-reread-key-sequence-naturally): Use non-nil
+       arg DONT-DOWNCASE-LAST of `read-key-sequence'.
+       (isearch-other-meta-char): Handle an undefined shifted printing
+       character by downshifting it.  (Bug#15200)
+
 2013-08-28  Juri Linkov  <juri@jurta.org>
 
        * isearch.el (isearch-search): Change regexp error message for
index 58f50eb905499bd701ce8442a4c87889cc6716db..131ab5893d4442245c17e93559cca203255b6552 100644 (file)
@@ -2249,7 +2249,9 @@ the bottom."
 Return the key sequence as a string/vector."
   (isearch-unread-key-sequence keylist)
   (let (overriding-terminal-local-map)
-    (read-key-sequence nil)))  ; This will go through function-key-map, if nec.
+    ;; This will go through function-key-map, if nec.
+    ;; The arg DONT-DOWNCASE-LAST prevents premature shift-translation.
+    (read-key-sequence nil nil t)))
 
 (defun isearch-lookup-scroll-key (key-seq)
   "If KEY-SEQ is bound to a scrolling command, return it as a symbol.
@@ -2307,6 +2309,16 @@ Isearch mode."
                    (lookup-key local-function-key-map key)))
             (while keylist
               (setq key (car keylist))
+              ;; Handle an undefined shifted printing character
+              ;; by downshifting it if that makes it printing.
+              ;; (As read-key-sequence would normally do,
+              ;; if we didn't have a default definition.)
+              (if (and (integerp key)
+                       (memq 'shift (event-modifiers key))
+                       (>= key (+ ?\s (- ?\S-a ?a)))
+                       (/= key (+ 127 (- ?\S-a ?a)))
+                       (<  key (+ 256 (- ?\S-a ?a))))
+                  (setq key (- key (- ?\S-a ?a))))
               ;; If KEY is a printing char, we handle it here
               ;; directly to avoid the input method and keyboard
               ;; coding system translating it.