[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 697341d 1/2: Add back occur-mode-find-occurrence for compatibilit
master 697341d 1/2: Add back occur-mode-find-occurrence for compatibility (bug#39121)
Sun, 25 Jul 2021 10:42:54 -0400 (EDT)
Author: Mattias EngdegÃ¥rd <firstname.lastname@example.org>
Commit: Mattias EngdegÃ¥rd <email@example.com>
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.
lisp/replace.el | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lisp/replace.el b/lisp/replace.el
index 09bdf28..f8c5fed 100644
@@ -1426,6 +1426,11 @@ To return to ordinary Occur mode, use
"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