diff options
| author | Eli Zaretskii | 2020-05-08 17:25:45 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2020-05-08 17:25:45 +0300 |
| commit | 2caf3e997e2a4013ffad10a047f24c98d02ab1d5 (patch) | |
| tree | 526591739af63930b33c152e769ad53384e96728 | |
| parent | 7081c1d66fe99964c28794420f8cf4169fb8f818 (diff) | |
| download | emacs-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.el | 20 |
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. | |||
| 318 | In buffers where Font Lock mode is enabled, patterns are | 318 | In buffers where Font Lock mode is enabled, patterns are |
| 319 | highlighted using font lock. In buffers where Font Lock mode is | 319 | highlighted using font lock. In buffers where Font Lock mode is |
| 320 | disabled, patterns are applied using overlays; in this case, the | 320 | disabled, patterns are applied using overlays; in this case, the |
| 321 | highlighting will not be updated as you type. | 321 | highlighting will not be updated as you type. The Font Lock mode |
| 322 | is considered \"enabled\" in a buffer if its `major-mode' | ||
| 323 | causes `font-lock-specified-p' to return non-nil, which means | ||
| 324 | the major mode specifies support for Font Lock. | ||
| 322 | 325 | ||
| 323 | When Hi Lock mode is enabled, a \"Regexp Highlighting\" submenu | 326 | When Hi Lock mode is enabled, a \"Regexp Highlighting\" submenu |
| 324 | is added to the \"Edit\" menu. The commands in the submenu, | 327 | 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. | |||
| 462 | 465 | ||
| 463 | Use Font lock mode, if enabled, to highlight REGEXP. Otherwise, | 466 | Use Font lock mode, if enabled, to highlight REGEXP. Otherwise, |
| 464 | use overlays for highlighting. If overlays are used, the | 467 | use overlays for highlighting. If overlays are used, the |
| 465 | highlighting will not update as you type." | 468 | highlighting will not update as you type. The Font Lock mode |
| 469 | is considered \"enabled\" in a buffer if its `major-mode' | ||
| 470 | causes `font-lock-specified-p' to return non-nil, which means | ||
| 471 | the 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 | ||
| 488 | Use Font lock mode, if enabled, to highlight REGEXP. Otherwise, | 494 | Use Font lock mode, if enabled, to highlight REGEXP. Otherwise, |
| 489 | use overlays for highlighting. If overlays are used, the | 495 | use overlays for highlighting. If overlays are used, the |
| 490 | highlighting will not update as you type." | 496 | highlighting will not update as you type. The Font Lock mode |
| 497 | is considered \"enabled\" in a buffer if its `major-mode' | ||
| 498 | causes `font-lock-specified-p' to return non-nil, which means | ||
| 499 | the 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. | |||
| 508 | Uses `find-tag-default-as-symbol-regexp' to retrieve the symbol at point. | 517 | Uses `find-tag-default-as-symbol-regexp' to retrieve the symbol at point. |
| 509 | 518 | ||
| 510 | This uses Font lock mode if it is enabled; otherwise it uses overlays, | 519 | This uses Font lock mode if it is enabled; otherwise it uses overlays, |
| 511 | in which case the highlighting will not update as you type." | 520 | in which case the highlighting will not update as you type. The Font |
| 521 | Lock mode is considered \"enabled\" in a buffer if its `major-mode' | ||
| 522 | causes `font-lock-specified-p' to return non-nil, which means | ||
| 523 | the 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))) |