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

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

bug#7534: 24.0.50; G-g within Isearch regexp mode


From: Dani Moncayo
Subject: bug#7534: 24.0.50; G-g within Isearch regexp mode
Date: Mon, 6 Dec 2010 11:41:32 +0100

On Mon, Dec 6, 2010 at 00:11, Juri Linkov <juri@jurta.org> wrote:
>> So, IMO, the main principle for C-g (within Isearch mode) should be:
>> * if there is unmatched and/or incomplete input --> Delete it.
>> * Otherwise --> Exit Isearch mode.
>
> Please try the following patch.  Does it provide the behavior
> you are asking for?
>

It does. Thank you.

PS: The patch bellow is like your's, but it also updates the comment
accordingly.


=== modified file 'lisp/isearch.el'
--- lisp/isearch.el     2010-10-16 14:11:06.000000000 +0200
+++ lisp/isearch.el     2010-12-06 11:27:33.000000000 +0100
@@ -1244,9 +1244,9 @@
   (interactive)
 ;;  (ding)  signal instead below, if quitting
   (discard-input)
-  (if isearch-success
-      ;; If search is successful, move back to starting point
-      ;; and really do quit.
+  (if (and isearch-success (not isearch-error))
+      ;; If search is successful and there is no incomplete regexp,
+      ;; move back to starting point and really do quit.
       (progn
         (setq isearch-success nil)
         (isearch-cancel))




-- 
Dani Moncayo





reply via email to

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