Function: embark-isearch-highlight-indicator

embark-isearch-highlight-indicator is a byte-compiled function defined in embark.el.

Signature

(embark-isearch-highlight-indicator)

Documentation

Action indicator highlighting all occurrences of the identifier at point.

This indicator only does something for targets which are identifiers or symbols. For those it uses isearch's lazy highlighting feature to highlight all occurrences of the target in the buffer. This indicator is best used in conjunction with embark-highlight-indicator: by using them both you get the target and the other occurrences of it highlighted in different colors.

Source Code

;; Defined in ~/.emacs.d/elpa/embark-20260610.302/embark.el
(defun embark-isearch-highlight-indicator ()
  "Action indicator highlighting all occurrences of the identifier at point.
This indicator only does something for targets which are
identifiers or symbols.  For those it uses `isearch''s lazy
highlighting feature to highlight all occurrences of the target in
the buffer.  This indicator is best used in conjunction with
`embark-highlight-indicator': by using them both you get the
target and the other occurrences of it highlighted in different
colors."
  (lambda (&optional _keymap targets _prefix)
    (if (and (not (minibufferp))
             (memq (plist-get (car targets) :type)
                   '(identifier command variable function
                                face library package symbol)))
        (let ((isearch-string (plist-get (car targets) :target))
              (isearch-regexp-function #'isearch-symbol-regexp))
          (isearch-lazy-highlight-new-loop))
      (setq isearch-lazy-highlight-last-string nil)
      (lazy-highlight-cleanup t))))