diff options
| author | Richard M. Stallman | 1996-02-04 21:11:50 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-02-04 21:11:50 +0000 |
| commit | 8ba83f4b87a73dc6cca6a831d472204013c678cc (patch) | |
| tree | 623a8559e2ad8c1392053d4c815fc722655c2cec | |
| parent | 68e0de82384fab6372cb7119b50679cf6885e604 (diff) | |
| download | emacs-8ba83f4b87a73dc6cca6a831d472204013c678cc.tar.gz emacs-8ba83f4b87a73dc6cca6a831d472204013c678cc.zip | |
(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. | |||
| 411 | The variable `view-highlight-face' controls the face that is used | 411 | The variable `view-highlight-face' controls the face that is used |
| 412 | for highlighting the match that is found." | 412 | for highlighting the match that is found." |
| 413 | (interactive "p") | 413 | (interactive "p") |
| 414 | (View-search-regexp-forward n view-last-regexp)) | 414 | (if view-last-regexp |
| 415 | (View-search-regexp-forward n view-last-regexp) | ||
| 416 | (error "No previous View-mode search"))) | ||
| 415 | 417 | ||
| 416 | (defun View-search-last-regexp-backward (n) | 418 | (defun View-search-last-regexp-backward (n) |
| 417 | "Search backward from window start for Nth instance of last regexp. | 419 | "Search backward from window start for Nth instance of last regexp. |
| @@ -421,7 +423,9 @@ pushes mark ring. | |||
| 421 | The variable `view-highlight-face' controls the face that is used | 423 | The variable `view-highlight-face' controls the face that is used |
| 422 | for highlighting the match that is found." | 424 | for highlighting the match that is found." |
| 423 | (interactive "p") | 425 | (interactive "p") |
| 424 | (View-search-regexp-backward n view-last-regexp)) | 426 | (if view-last-regexp |
| 427 | (View-search-regexp-backward n view-last-regexp) | ||
| 428 | (error "No previous View-mode search"))) | ||
| 425 | 429 | ||
| 426 | (defun View-back-to-mark (&optional ignore) | 430 | (defun View-back-to-mark (&optional ignore) |
| 427 | "Return to last mark set in View mode, else beginning of file. | 431 | "Return to last mark set in View mode, else beginning of file. |