Commit 925a67ca authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(isearch-abort): Treat "incomplete regexp"

as failure when deciding how much to discard for C-g.
parent 95626e11
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu> ;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu>
;; |$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. ;; This file is part of GNU Emacs.
...@@ -800,8 +800,10 @@ Use `isearch-exit' to quit without signalling." ...@@ -800,8 +800,10 @@ Use `isearch-exit' to quit without signalling."
(setq isearch-success nil) (setq isearch-success nil)
(isearch-done t) ; exit isearch (isearch-done t) ; exit isearch
(signal 'quit nil)) ; and pass on quit signal (signal 'quit nil)) ; and pass on quit signal
;; If search is failing, rub out until it is once more successful. ;; If search is failing, or has an incomplete regexp,
(while (not isearch-success) (isearch-pop-state)) ;; rub out until it is once more successful.
(while (or (not isearch-success) isearch-invalid-regexp)
(isearch-pop-state))
(isearch-update))) (isearch-update)))
(defun isearch-repeat (direction) (defun isearch-repeat (direction)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment