Mercurial > emacs
changeset 18483:4d66cfbc5735
(nonincremental-repeat-search-forward)
(nonincremental-repeat-search-backward)
(nonincremental-repeat-re-search-forward)
(nonincremental-repeat-re-search-backward):
Special error check for no previous search.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 28 Jun 1997 03:15:16 +0000 |
parents | 9c5e6b1dafc5 |
children | fade5fd2fab4 |
files | lisp/menu-bar.el |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/menu-bar.el Sat Jun 28 03:09:27 1997 +0000 +++ b/lisp/menu-bar.el Sat Jun 28 03:15:16 1997 +0000 @@ -183,21 +183,29 @@ (defun nonincremental-repeat-search-forward () "Search forward for the previous search string." (interactive) + (if (null search-ring) + (error "No previous search")) (search-forward (car search-ring))) (defun nonincremental-repeat-search-backward () "Search backward for the previous search string." (interactive) + (if (null search-ring) + (error "No previous search")) (search-backward (car search-ring))) (defun nonincremental-repeat-re-search-forward () "Search forward for the previous regular expression." (interactive) + (if (null regex-search-ring) + (error "No previous search")) (re-search-forward (car regexp-search-ring))) (defun nonincremental-repeat-re-search-backward () "Search backward for the previous regular expression." (interactive) + (if (null regex-search-ring) + (error "No previous search")) (re-search-backward (car regexp-search-ring))) (define-key menu-bar-search-menu [query-replace-regexp]