From: Richard M. Stallman Date: Tue, 3 Aug 1993 01:07:55 +0000 (+0000) Subject: (occur-mode-goto-occurrence): Give meaningful error X-Git-Tag: emacs-19.34~11422 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=43549f18f506866eebe66f91a04a2e2b41eccb0b;p=emacs.git (occur-mode-goto-occurrence): Give meaningful error message if there's nowhere useful to go. --- diff --git a/lisp/replace.el b/lisp/replace.el index 2a4dad983a1..0b0e56df2fe 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -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))))