From: Juri Linkov Date: Thu, 6 Aug 2020 23:55:00 +0000 (+0300) Subject: * lisp/hi-lock.el (hi-lock-set-pattern): Display warning on narrow (bug#42609) X-Git-Tag: emacs-28.0.90~6779 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=874e0e7323631a5da61fa5a7fd35d7a3d9c4af61;p=emacs.git * lisp/hi-lock.el (hi-lock-set-pattern): Display warning on narrow (bug#42609) --- 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."