From: Eli Zaretskii Date: Tue, 9 Oct 2018 14:55:15 +0000 (+0300) Subject: Revert part of last commit X-Git-Tag: emacs-27.0.90~4323 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=262f5c809913a232a931131d040964cbdf4ac6f9;p=emacs.git Revert part of last commit * lisp/replace.el (occur-revert-function): Revert last change, as it's no longer needed. (Bug#32987) --- diff --git a/lisp/replace.el b/lisp/replace.el index 7d313842c04..a134e4e3e58 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -1207,19 +1207,7 @@ To return to ordinary Occur mode, use \\[occur-cease-edit]." (defun occur-revert-function (_ignore1 _ignore2) "Handle `revert-buffer' for Occur mode buffers." - (if (cdr (nth 2 occur-revert-arguments)) ; multi-occur - (apply 'occur-1 (append occur-revert-arguments (list (buffer-name)))) - (pcase-let ((`(,region-start ,region-end ,orig-line ,buffer) - (occur--parse-occur-buffer)) - (regexp (car occur-revert-arguments))) - (if (not (or region-start region-end)) - (apply 'occur-1 (append occur-revert-arguments (list (buffer-name)))) - (with-current-buffer buffer - (when (wholenump orig-line) - (goto-char (point-min)) - (forward-line (1- orig-line))) - (save-excursion - (occur regexp nil (list (cons region-start region-end))))))))) + (apply #'occur-1 (append occur-revert-arguments (list (buffer-name))))) (defun occur-mode-find-occurrence () (let ((pos (get-text-property (point) 'occur-target)))