1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 04:10:54 -08:00

(occur-mode-goto-occurrence): Give meaningful error

message if there's nowhere useful to go.
This commit is contained in:
Richard M. Stallman 1993-08-03 01:07:55 +00:00
parent 314ed6a5aa
commit 43549f18f5

View 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))))