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: Thu, 19 Dec 2013 01:22:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)

> In other words, it appears to be working correctly!

Glad to hear this is working correctly.

Meanwhile, I found another problem: typing <backspace>
in Isearch while in the Gnus Summary buffer exits Isearch
and runs `gnus-summary-prev-page' because <backspace>
is bound explicitly in Gnus.  But in other buffers,
<backspace> in Isearch runs `isearch-delete-char'.
So it requires an explicit binding in `isearch-mode-map':

=== modified file 'lisp/isearch.el'
--- lisp/isearch.el     2013-12-16 20:32:15 +0000
+++ lisp/isearch.el     2013-12-18 23:12:31 +0000
@@ -446,6 +476,7 @@ (defvar isearch-mode-map
     (define-key map "\M-\C-s" 'isearch-repeat-forward)
     (define-key map "\M-\C-r" 'isearch-repeat-backward)
     (define-key map "\177" 'isearch-delete-char)
+    (define-key map [backspace] 'isearch-delete-char)
     (define-key map "\C-g" 'isearch-abort)
 

BTW, this also reminded that preferable key bindings
could be advertised with `advertised-binding',
so I'm going to install also this change too:

=== modified file 'lisp/isearch.el'
--- lisp/isearch.el     2013-12-16 20:32:15 +0000
+++ lisp/isearch.el     2013-12-18 23:12:31 +0000
@@ -500,6 +536,15 @@ (defvar isearch-mode-map
     (define-key map "\M-r" 'isearch-toggle-regexp)
     (define-key map "\M-e" 'isearch-edit-string)
 
+    (put 'isearch-toggle-case-fold :advertised-binding "\M-sc")
+    (put 'isearch-toggle-regexp    :advertised-binding "\M-sr")
+    (put 'isearch-edit-string      :advertised-binding "\M-se")
+
+    (define-key map "\M-se" 'isearch-edit-string)
     (define-key map "\M-sc" 'isearch-toggle-case-fold)
     (define-key map "\M-si" 'isearch-toggle-invisible)
     (define-key map "\M-sr" 'isearch-toggle-regexp)





reply via email to

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