From 874e0e7323631a5da61fa5a7fd35d7a3d9c4af61 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Fri, 7 Aug 2020 02:55:00 +0300 Subject: [PATCH] * 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 a18310322ad..33ca40f8dec 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." -- 2.39.2