]> git.eshelyaron.com Git - emacs.git/commitdiff
Add back occur-mode-find-occurrence for compatibility (bug#39121)
authorMattias Engdegård <mattiase@acm.org>
Sun, 25 Jul 2021 13:55:50 +0000 (15:55 +0200)
committerMattias Engdegård <mattiase@acm.org>
Sun, 25 Jul 2021 14:40:59 +0000 (16:40 +0200)
* 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.

lisp/replace.el

index 09bdf28dbce1603b1cc426a4128b2af9057556ce..f8c5fed55789e66170a62473685df05e8c454480 100644 (file)
@@ -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