diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2021-07-25 15:55:50 +0200 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2021-07-25 16:40:59 +0200 |
commit | 697341d7fd80091a4243a813e2aecc07fd49b10c (patch) | |
tree | 7098af296b2673bba96fb79118280dd84bad6b5c /lisp | |
parent | 41a55a330f518254da795719ac6e3085254d4110 (diff) | |
download | emacs-697341d7fd80091a4243a813e2aecc07fd49b10c.tar.gz emacs-697341d7fd80091a4243a813e2aecc07fd49b10c.tar.bz2 emacs-697341d7fd80091a4243a813e2aecc07fd49b10c.zip |
Add back occur-mode-find-occurrence for compatibility (bug#39121)
* lisp/replace.el (occur-mode-find-occurrence):
Put back (an emulation of) the previously removed function.
It is used internally in eshell and in some external code.
Problem found by Basil Contovounesios.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/replace.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/replace.el b/lisp/replace.el index 09bdf28dbce..f8c5fed5578 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -1426,6 +1426,11 @@ To return to ordinary Occur mode, use \\[occur-cease-edit]." "Handle `revert-buffer' for Occur mode buffers." (apply #'occur-1 (append occur-revert-arguments (list (buffer-name))))) +;; Retained for compatibility. +(defun occur-mode-find-occurrence () + "Return a marker to the first match of the line at point." + (occur--targets-start (occur-mode--find-occurrences))) + (defun occur-mode--find-occurrences () ;; The `occur-target' property value is a list of (BEG . END) for each ;; match on the line, or (for compatibility) a single marker to the start |