Function: hl-todo-search-and-highlight

hl-todo-search-and-highlight is a natively compiled function defined in hl-todo.el.

Signature

(hl-todo-search-and-highlight)

Documentation

Highlight TODO and similar keywords starting at point.

Intended to be added to magit-revision-wash-message-hook and magit-log-wash-summary-hook, but might be useful elsewhere too.

Source Code

;; Defined in /nix/store/b97f5zr6snxdbh1bgqmj50mq949vd13i-emacs-packages-deps/share/emacs/site-lisp/elpa/hl-todo-20261001.1547/hl-todo.el
;;;###autoload
(defun hl-todo-search-and-highlight ()
  "Highlight TODO and similar keywords starting at point.
Intended to be added to `magit-revision-wash-message-hook' and
`magit-log-wash-summary-hook', but might be useful elsewhere too."
  (let ((case-fold-search nil)
        (regexp (hl-todo--regexp)))
    (while (re-search-forward regexp nil t)
      (put-text-property (match-beginning 1)
                         (match-end 1)
                         'font-lock-face (hl-todo--get-face)))))