GNU bug report logs -
#7534
24.0.50; G-g within Isearch regexp mode
Previous Next
Reported by: Dani Moncayo <dmoncayo <at> gmail.com>
Date: Thu, 2 Dec 2010 19:42:02 UTC
Severity: normal
Found in version 24.0.50
Done: Juri Linkov <juri <at> jurta.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Mon, Dec 6, 2010 at 00:11, Juri Linkov <juri <at> 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
This bug report was last modified 14 years and 188 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.