emacs-diffs
[Top][All Lists]
Advanced

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

master 874e0e7: * lisp/hi-lock.el (hi-lock-set-pattern): Display warning


From: Juri Linkov
Subject: master 874e0e7: * lisp/hi-lock.el (hi-lock-set-pattern): Display warning on narrow (bug#42609)
Date: Thu, 6 Aug 2020 19:55:14 -0400 (EDT)

branch: master
commit 874e0e7323631a5da61fa5a7fd35d7a3d9c4af61
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>

    * lisp/hi-lock.el (hi-lock-set-pattern): Display warning on narrow 
(bug#42609)
---
 lisp/hi-lock.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el
index a183103..33ca40f 100644
--- a/lisp/hi-lock.el
+++ b/lisp/hi-lock.el
@@ -812,7 +812,9 @@ SPACES-REGEXP is a regexp to substitute spaces in font-lock 
search."
               (setq hi-lock-interactive-patterns
                     (cdr hi-lock-interactive-patterns)
                     hi-lock-interactive-lighters
-                    (cdr hi-lock-interactive-lighters)))))))))
+                    (cdr hi-lock-interactive-lighters))))
+          (when (or (> search-start (point-min)) (< search-end (point-max)))
+            (message "Hi-lock added only in range %d-%d" search-start 
search-end)))))))
 
 (defun hi-lock-set-file-patterns (patterns)
   "Replace file patterns list with PATTERNS and refontify."



reply via email to

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