diff --git a/lisp/replace.el b/lisp/replace.el index a56e493d99..cd1bf9057f 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -1741,7 +1741,11 @@ occur-excluded-properties :version "22.1") (defun occur-read-primary-args () - (let* ((perform-collect (consp current-prefix-arg)) + (when isearch-lazy-highlight + (add-hook 'minibuffer-setup-hook 'minibuffer-lazy-highlight-setup)) + (let* ((isearch-regexp t) + (isearch-case-fold-search case-fold-search) + (perform-collect (consp current-prefix-arg)) (regexp (read-regexp (if perform-collect "Collect strings matching regexp" "List lines matching regexp")