]> git.eshelyaron.com Git - emacs.git/commitdiff
(occur-mode-goto-occurrence): Give meaningful error
authorRichard M. Stallman <rms@gnu.org>
Tue, 3 Aug 1993 01:07:55 +0000 (01:07 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 3 Aug 1993 01:07:55 +0000 (01:07 +0000)
message if there's nowhere useful to go.

lisp/replace.el

index 2a4dad983a1012bc05ba7fdd20e46bd4c618c8fb..0b0e56df2fe2df214a780c9842ca1f3b8496205d 100644 (file)
@@ -250,6 +250,8 @@ in the buffer that the occurrences were found in.
                                   (+ 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))))
 \f