diff options
| author | Richard M. Stallman | 1993-08-03 01:07:55 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-08-03 01:07:55 +0000 |
| commit | 43549f18f506866eebe66f91a04a2e2b41eccb0b (patch) | |
| tree | 39205befcfd851935ac4baf508267652de5506e5 /lisp/replace.el | |
| parent | 314ed6a5aa357c4b55f3a897def29869a02dd752 (diff) | |
| download | emacs-43549f18f506866eebe66f91a04a2e2b41eccb0b.tar.gz emacs-43549f18f506866eebe66f91a04a2e2b41eccb0b.zip | |
(occur-mode-goto-occurrence): Give meaningful error
message if there's nowhere useful to go.
Diffstat (limited to 'lisp/replace.el')
| -rw-r--r-- | lisp/replace.el | 2 |
1 files changed, 2 insertions, 0 deletions
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. | |||
| 250 | (+ 2 (* 2 occur-nlines))) | 250 | (+ 2 (* 2 occur-nlines))) |
| 251 | (t 1))))) | 251 | (t 1))))) |
| 252 | (pos (nth occur-number occur-pos-list))) | 252 | (pos (nth occur-number occur-pos-list))) |
| 253 | (or pos | ||
| 254 | (error "No occurrence on this line")) | ||
| 253 | (pop-to-buffer occur-buffer) | 255 | (pop-to-buffer occur-buffer) |
| 254 | (goto-char (marker-position pos)))) | 256 | (goto-char (marker-position pos)))) |
| 255 | 257 | ||