changeset 4429:847ef9a62e5d

(occur-mode-goto-occurrence): Give meaningful error message if there's nowhere useful to go.
author Richard M. Stallman <rms@gnu.org>
date Tue, 03 Aug 1993 01:07:55 +0000
parents b95bd397d6b7
children ecac48eaacce
files lisp/replace.el
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/replace.el	Mon Aug 02 23:33:41 1993 +0000
+++ b/lisp/replace.el	Tue Aug 03 01:07:55 1993 +0000
@@ -250,6 +250,8 @@
 				   (+ 2 (* 2 occur-nlines)))
 				  (t 1)))))
 	 (pos (nth occur-number occur-pos-list)))
+    (or pos
+	(error "No occurrence on this line"))
     (pop-to-buffer occur-buffer)
     (goto-char (marker-position pos))))