]> code.delx.au - gnu-emacs/blobdiff - lisp/view.el
(buffer-file-numbers-unique): New variable;
[gnu-emacs] / lisp / view.el
index e4b0c6b1ec46ec773941d154595663f47a698907..75d37cd0736c9716b9187da779c2268a8e87b224 100644 (file)
@@ -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.