From: Richard M. Stallman Date: Sat, 18 Mar 1995 18:10:21 +0000 (+0000) Subject: (isearch-abort): Treat "incomplete regexp" X-Git-Tag: emacs-19.34~4797 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=925a67ca07b1c9986d432be8c3105dd04c65de22;p=emacs.git (isearch-abort): Treat "incomplete regexp" as failure when deciding how much to discard for C-g. --- diff --git a/lisp/isearch.el b/lisp/isearch.el index 90c26744978..79f2c5d11ce 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -4,7 +4,7 @@ ;; Author: Daniel LaLiberte -;; |$Date: 1995/01/11 02:24:09 $|$Revision: 1.83 $ +;; |$Date: 1995/03/16 23:31:39 $|$Revision: 1.84 $ ;; This file is part of GNU Emacs. @@ -800,8 +800,10 @@ Use `isearch-exit' to quit without signalling." (setq isearch-success nil) (isearch-done t) ; exit isearch (signal 'quit nil)) ; and pass on quit signal - ;; If search is failing, rub out until it is once more successful. - (while (not isearch-success) (isearch-pop-state)) + ;; If search is failing, or has an incomplete regexp, + ;; rub out until it is once more successful. + (while (or (not isearch-success) isearch-invalid-regexp) + (isearch-pop-state)) (isearch-update))) (defun isearch-repeat (direction)