aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2020-05-08 17:25:45 +0300
committerEli Zaretskii2020-05-08 17:25:45 +0300
commit2caf3e997e2a4013ffad10a047f24c98d02ab1d5 (patch)
tree526591739af63930b33c152e769ad53384e96728
parent7081c1d66fe99964c28794420f8cf4169fb8f818 (diff)
downloademacs-2caf3e997e2a4013ffad10a047f24c98d02ab1d5.tar.gz
emacs-2caf3e997e2a4013ffad10a047f24c98d02ab1d5.zip
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)
-rw-r--r--lisp/hi-lock.el20
1 files changed, 16 insertions, 4 deletions
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el
index de258935e18..0f685464cdd 100644
--- a/lisp/hi-lock.el
+++ b/lisp/hi-lock.el
@@ -318,7 +318,10 @@ or add (global-hi-lock-mode 1) to your init file.
318In buffers where Font Lock mode is enabled, patterns are 318In buffers where Font Lock mode is enabled, patterns are
319highlighted using font lock. In buffers where Font Lock mode is 319highlighted using font lock. In buffers where Font Lock mode is
320disabled, patterns are applied using overlays; in this case, the 320disabled, patterns are applied using overlays; in this case, the
321highlighting will not be updated as you type. 321highlighting will not be updated as you type. The Font Lock mode
322is considered \"enabled\" in a buffer if its `major-mode'
323causes `font-lock-specified-p' to return non-nil, which means
324the major mode specifies support for Font Lock.
322 325
323When Hi Lock mode is enabled, a \"Regexp Highlighting\" submenu 326When Hi Lock mode is enabled, a \"Regexp Highlighting\" submenu
324is added to the \"Edit\" menu. The commands in the submenu, 327is 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.
462 465
463Use Font lock mode, if enabled, to highlight REGEXP. Otherwise, 466Use Font lock mode, if enabled, to highlight REGEXP. Otherwise,
464use overlays for highlighting. If overlays are used, the 467use overlays for highlighting. If overlays are used, the
465highlighting will not update as you type." 468highlighting will not update as you type. The Font Lock mode
469is considered \"enabled\" in a buffer if its `major-mode'
470causes `font-lock-specified-p' to return non-nil, which means
471the major mode specifies support for Font Lock."
466 (interactive 472 (interactive
467 (list 473 (list
468 (hi-lock-regexp-okay 474 (hi-lock-regexp-okay
@@ -487,7 +493,10 @@ letters case-insensitive, before highlighting with `hi-lock-set-pattern'.
487 493
488Use Font lock mode, if enabled, to highlight REGEXP. Otherwise, 494Use Font lock mode, if enabled, to highlight REGEXP. Otherwise,
489use overlays for highlighting. If overlays are used, the 495use overlays for highlighting. If overlays are used, the
490highlighting will not update as you type." 496highlighting will not update as you type. The Font Lock mode
497is considered \"enabled\" in a buffer if its `major-mode'
498causes `font-lock-specified-p' to return non-nil, which means
499the major mode specifies support for Font Lock."
491 (interactive 500 (interactive
492 (list 501 (list
493 (hi-lock-regexp-okay 502 (hi-lock-regexp-okay
@@ -508,7 +517,10 @@ unless you use a prefix argument.
508Uses `find-tag-default-as-symbol-regexp' to retrieve the symbol at point. 517Uses `find-tag-default-as-symbol-regexp' to retrieve the symbol at point.
509 518
510This uses Font lock mode if it is enabled; otherwise it uses overlays, 519This uses Font lock mode if it is enabled; otherwise it uses overlays,
511in which case the highlighting will not update as you type." 520in which case the highlighting will not update as you type. The Font
521Lock mode is considered \"enabled\" in a buffer if its `major-mode'
522causes `font-lock-specified-p' to return non-nil, which means
523the major mode specifies support for Font Lock."
512 (interactive) 524 (interactive)
513 (let* ((regexp (hi-lock-regexp-okay 525 (let* ((regexp (hi-lock-regexp-okay
514 (find-tag-default-as-symbol-regexp))) 526 (find-tag-default-as-symbol-regexp)))