Mercurial > emacs
comparison lisp/isearch.el @ 11046:a9045ed63e20
(isearch-abort): Set isearch-success to nil.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 16 Mar 1995 23:31:39 +0000 |
parents | 8fe0c72ba336 |
children | 2f41090c58b3 |
comparison
equal
deleted
inserted
replaced
11045:b4bf1f2d99f8 | 11046:a9045ed63e20 |
---|---|
2 | 2 |
3 ;; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu> | 5 ;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu> |
6 | 6 |
7 ;; |$Date: 1994/12/26 05:09:07 $|$Revision: 1.82 $ | 7 ;; |$Date: 1995/01/11 02:24:09 $|$Revision: 1.83 $ |
8 | 8 |
9 ;; This file is part of GNU Emacs. | 9 ;; This file is part of GNU Emacs. |
10 | 10 |
11 ;; GNU Emacs is free software; you can redistribute it and/or modify | 11 ;; GNU Emacs is free software; you can redistribute it and/or modify |
12 ;; it under the terms of the GNU General Public License as published by | 12 ;; it under the terms of the GNU General Public License as published by |
795 (discard-input) | 795 (discard-input) |
796 (if isearch-success | 796 (if isearch-success |
797 ;; If search is successful, move back to starting point | 797 ;; If search is successful, move back to starting point |
798 ;; and really do quit. | 798 ;; and really do quit. |
799 (progn (goto-char isearch-opoint) | 799 (progn (goto-char isearch-opoint) |
800 (setq isearch-success nil) | |
800 (isearch-done t) ; exit isearch | 801 (isearch-done t) ; exit isearch |
801 (signal 'quit nil)) ; and pass on quit signal | 802 (signal 'quit nil)) ; and pass on quit signal |
802 ;; If search is failing, rub out until it is once more successful. | 803 ;; If search is failing, rub out until it is once more successful. |
803 (while (not isearch-success) (isearch-pop-state)) | 804 (while (not isearch-success) (isearch-pop-state)) |
804 (isearch-update))) | 805 (isearch-update))) |
805 | |
806 | 806 |
807 (defun isearch-repeat (direction) | 807 (defun isearch-repeat (direction) |
808 ;; Utility for isearch-repeat-forward and -backward. | 808 ;; Utility for isearch-repeat-forward and -backward. |
809 (if (eq isearch-forward (eq direction 'forward)) | 809 (if (eq isearch-forward (eq direction 'forward)) |
810 ;; C-s in forward or C-r in reverse. | 810 ;; C-s in forward or C-r in reverse. |