emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-27 2caf3e9: Improve documentation of Hi Lock mode


From: Eli Zaretskii
Subject: emacs-27 2caf3e9: Improve documentation of Hi Lock mode
Date: Fri, 8 May 2020 10:27:03 -0400 (EDT)

branch: emacs-27
commit 2caf3e997e2a4013ffad10a047f24c98d02ab1d5
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    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)
---
 lisp/hi-lock.el | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el
index de25893..0f68546 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.
 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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]