]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/hi-lock.el (hi-lock-set-pattern): Display warning on narrow (bug#42609)
authorJuri Linkov <juri@linkov.net>
Thu, 6 Aug 2020 23:55:00 +0000 (02:55 +0300)
committerJuri Linkov <juri@linkov.net>
Thu, 6 Aug 2020 23:55:00 +0000 (02:55 +0300)
lisp/hi-lock.el

index a18310322ad5bcaaf7976e4defedd4c9f8e42921..33ca40f8dec54a76d287f1d72ccdc4f72db80cd1 100644 (file)
@@ -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."