diff lisp/replace.el @ 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 bc0af06c6e3c
children db0c6ed6f145
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))))