Improve documentation of Hi Lock mode

* lisp/hi-lock.el (hi-lock-mode, hi-lock-face-buffer)
(hi-lock-face-phrase-buffer, hi-lock-face-symbol-at-point):
Clarify when 'hi-lock-mode' will use Font Lock and when it will
use overlays.  (Bug#41124)
This commit is contained in:
Eli Zaretskii 2020-05-08 17:25:45 +03:00
parent 7081c1d66f
commit 2caf3e997e

View file

@ -318,7 +318,10 @@ or add (global-hi-lock-mode 1) to your init file.
In buffers where Font Lock mode is enabled, patterns are
highlighted using font lock. In buffers where Font Lock mode is
disabled, patterns are applied using overlays; in this case, the
highlighting will not be updated as you type.
highlighting will not be updated as you type. The Font Lock mode
is considered \"enabled\" in a buffer if its `major-mode'
causes `font-lock-specified-p' to return non-nil, which means
the major mode specifies support for Font Lock.
When Hi Lock mode is enabled, a \"Regexp Highlighting\" submenu
is added to the \"Edit\" menu. The commands in the submenu,
@ -462,7 +465,10 @@ If SUBEXP is omitted or nil, the entire REGEXP is highlighted.
Use Font lock mode, if enabled, to highlight REGEXP. Otherwise,
use overlays for highlighting. If overlays are used, the
highlighting will not update as you type."
highlighting will not update as you type. The Font Lock mode
is considered \"enabled\" in a buffer if its `major-mode'
causes `font-lock-specified-p' to return non-nil, which means
the major mode specifies support for Font Lock."
(interactive
(list
(hi-lock-regexp-okay
@ -487,7 +493,10 @@ letters case-insensitive, before highlighting with `hi-lock-set-pattern'.
Use Font lock mode, if enabled, to highlight REGEXP. Otherwise,
use overlays for highlighting. If overlays are used, the
highlighting will not update as you type."
highlighting will not update as you type. The Font Lock mode
is considered \"enabled\" in a buffer if its `major-mode'
causes `font-lock-specified-p' to return non-nil, which means
the major mode specifies support for Font Lock."
(interactive
(list
(hi-lock-regexp-okay
@ -508,7 +517,10 @@ unless you use a prefix argument.
Uses `find-tag-default-as-symbol-regexp' to retrieve the symbol at point.
This uses Font lock mode if it is enabled; otherwise it uses overlays,
in which case the highlighting will not update as you type."
in which case the highlighting will not update as you type. The Font
Lock mode is considered \"enabled\" in a buffer if its `major-mode'
causes `font-lock-specified-p' to return non-nil, which means
the major mode specifies support for Font Lock."
(interactive)
(let* ((regexp (hi-lock-regexp-okay
(find-tag-default-as-symbol-regexp)))