# HG changeset patch # User Richard M. Stallman # Date 823468310 0 # Node ID ce77caa93022c7510ad0c53099748d04d9f747cd # Parent c463c25a6806fdb1273a141940cfce0099f40df7 (View-search-last-regexp-forward) (View-search-last-regexp-backward): Nice error if no prev regexp. diff -r c463c25a6806 -r ce77caa93022 lisp/view.el --- a/lisp/view.el Sun Feb 04 20:25:10 1996 +0000 +++ b/lisp/view.el Sun Feb 04 21:11:50 1996 +0000 @@ -411,7 +411,9 @@ 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 @@ 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.