bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#16035: 24.3.50; Custom isearch broken on trunk (e.g. change-log-mode


From: Juri Linkov
Subject: bug#16035: 24.3.50; Custom isearch broken on trunk (e.g. change-log-mode)
Date: Mon, 16 Dec 2013 22:32:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)

> I just found another (minor) detail problem regarding the new isearch
> system.
>
> I sometimes use ESCAPE as the meta key. However, to exit an isearch search,
> pressing the real meta key (Cmd, on my mac) and < work as intended.
> However, the sequence ESCAPE < does not. Emacs simply responds that
> "<escape> < is undefined".

Hopefully, the following patch fixes this in a correct way.
At least, it works in all tests that I tried:

C-s ESC <       - exits isearch and goes to the top
C-s ESC c       - doesn't exit isearch and toggles case-sensitivity
C-s ESC ESC ESC - cancels isearch

=== modified file 'lisp/isearch.el'
--- lisp/isearch.el     2013-12-06 00:55:20 +0000
+++ lisp/isearch.el     2013-12-16 20:28:12 +0000
@@ -435,8 +435,7 @@ (defvar isearch-mode-map
     ;; would be simpler to disable the global keymap, and/or have a
     ;; default local key binding for any key not otherwise bound.
     (let ((meta-map (make-sparse-keymap)))
-      (define-key map (char-to-string meta-prefix-char) meta-map)
-      (define-key map [escape] meta-map))
+      (define-key map (char-to-string meta-prefix-char) meta-map))
 
     ;; Several non-printing chars change the searching behavior.
     (define-key map "\C-s" 'isearch-repeat-forward)
@@ -453,7 +452,6 @@ (defvar isearch-mode-map
     (or (= ?\e meta-prefix-char)
        (error "Inconsistency in isearch.el"))
     (define-key map "\e\e\e" 'isearch-cancel)
-    (define-key map  [escape escape escape] 'isearch-cancel)
 
     (define-key map "\C-q" 'isearch-quote-char)
 





reply via email to

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