From d4119912fb6872f1311a97d8cf318b456f5cdef9 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sun, 16 Jan 2011 01:04:22 +0000 Subject: [PATCH] * lisp/isearch.el (isearch-abort): Don't quit if search has an incomplete regexp (isearch-error is non-nil). (Bug#7534) --- lisp/ChangeLog | 5 +++++ lisp/isearch.el | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1c772934c20..0a4dc699953 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-01-16 Juri Linkov + + * isearch.el (isearch-abort): Don't quit if search has + an incomplete regexp (isearch-error is non-nil). (Bug#7534) + 2011-01-15 Mark Diekhans * files.el (backup-buffer): Make last-resort backup file in diff --git a/lisp/isearch.el b/lisp/isearch.el index d8efe78d856..7fd96df1b07 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1244,9 +1244,9 @@ Use `isearch-exit' to quit without signaling." (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 has no incomplete regexp, + ;; move back to starting point and really do quit. (progn (setq isearch-success nil) (isearch-cancel)) -- 2.39.2