diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-02-04 21:11:50 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-02-04 21:11:50 +0000 |
commit | 351aa524d1a5f2c6a5e3a0708c592965f78bdf5f (patch) | |
tree | 8df9ff237a50a8a7fb23503316d0bbfb58feefeb | |
parent | 39db301ab986e06e0915ce517ae0ece3a34f5ef9 (diff) | |
download | emacs-351aa524d1a5f2c6a5e3a0708c592965f78bdf5f.tar.gz |
(View-search-last-regexp-forward)
(View-search-last-regexp-backward): Nice error if no prev regexp.
-rw-r--r-- | lisp/view.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/view.el b/lisp/view.el index e4b0c6b1ec4..75d37cd0736 100644 --- a/lisp/view.el +++ b/lisp/view.el @@ -411,7 +411,9 @@ and pushes mark ring. The variable `view-highlight-face' controls the face that is used for highlighting the match that is found." (interactive "p") - (View-search-regexp-forward n view-last-regexp)) + (if view-last-regexp + (View-search-regexp-forward n view-last-regexp) + (error "No previous View-mode search"))) (defun View-search-last-regexp-backward (n) "Search backward from window start for Nth instance of last regexp. @@ -421,7 +423,9 @@ pushes mark ring. The variable `view-highlight-face' controls the face that is used for highlighting the match that is found." (interactive "p") - (View-search-regexp-backward n view-last-regexp)) + (if view-last-regexp + (View-search-regexp-backward n view-last-regexp) + (error "No previous View-mode search"))) (defun View-back-to-mark (&optional ignore) "Return to last mark set in View mode, else beginning of file. |