# HG changeset patch # User Richard M. Stallman # Date 744340075 0 # Node ID 847ef9a62e5d80ee7ebdf0bd472b8273dc8aad51 # Parent b95bd397d6b7a47647c7e90e97693152a22eeb24 (occur-mode-goto-occurrence): Give meaningful error message if there's nowhere useful to go. diff -r b95bd397d6b7 -r 847ef9a62e5d lisp/replace.el --- 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))))