summaryrefslogtreecommitdiff
path: root/lisp/isearch.el
diff options
context:
space:
mode:
authorJuri Linkov <juri@jurta.org>2013-08-28 19:39:51 +0300
committerJuri Linkov <juri@jurta.org>2013-08-28 19:39:51 +0300
commit274919fde2998e88a7f52e8076f0e39322921f70 (patch)
tree447a1983311f00cff6e4468f5e088f6c66a9b8b2 /lisp/isearch.el
parent121f8c95b2925f9bb4d65a7076c8024d474adb11 (diff)
downloademacs-274919fde2998e88a7f52e8076f0e39322921f70.tar.gz
* 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. Fixes: debbugs:15200
Diffstat (limited to 'lisp/isearch.el')
-rw-r--r--lisp/isearch.el14
1 files changed, 13 insertions, 1 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 58f50eb9054..131ab5893d4 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -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.