emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r114046: * lisp/isearch.el (isearch-reread-key-seque


From: Juri Linkov
Subject: [Emacs-diffs] trunk r114046: * lisp/isearch.el (isearch-reread-key-sequence-naturally): Use non-nil
Date: Wed, 28 Aug 2013 16:39:55 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114046
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/15200
committer: Juri Linkov <address@hidden>
branch nick: trunk
timestamp: Wed 2013-08-28 19:39:51 +0300
message:
  * lisp/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.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/isearch.el                isearch.el-20091113204419-o5vbwnq5f7feedwu-486
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-08-28 16:33:02 +0000
+++ b/lisp/ChangeLog    2013-08-28 16:39:51 +0000
@@ -1,5 +1,12 @@
 2013-08-28  Juri Linkov  <address@hidden>
 
+       * 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  <address@hidden>
+
        * isearch.el (isearch-search): Change regexp error message for
        non-regexp searches.  (Bug#15166)
 

=== modified file 'lisp/isearch.el'
--- a/lisp/isearch.el   2013-08-28 16:33:02 +0000
+++ b/lisp/isearch.el   2013-08-28 16:39:51 +0000
@@ -2249,7 +2249,9 @@
 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 @@
                    (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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]