GNU bug report logs - #31915
26.0.50; highlight-regexp does not highlight regexp

Previous Next

Package: emacs;

Reported by: Markus Triska <triska <at> metalevel.at>

Date: Wed, 20 Jun 2018 16:27:02 UTC

Severity: minor

Found in version 26.0.50

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Markus Triska <triska <at> metalevel.at>
Cc: 31915 <at> debbugs.gnu.org
Subject: bug#31915: 26.0.50; highlight-regexp does not highlight regexp
Date: Wed, 20 Jun 2018 20:07:51 +0300
> From: Markus Triska <triska <at> metalevel.at>
> Date: Wed, 20 Jun 2018 18:26:13 +0200
> 
> Please invoke Emacs via:
> 
>     $ emacs -Q --eval "(let ((x \"x\"))                 \
>                          (find-file x)                  \
>                          (insert x)                     \
>                          (highlight-regexp x 'hi-green) \
>                          (when font-lock-mode (insert x)))"
> 
> The docstring of highlight-regexp states:
> 
>     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.
> 
> Since font-lock-mode is clearly enabled when the second "x" is inserted,
> I expect it to be highlighted.

Actually, that buffer is in Fundamental mode, where there's no
font-lock.  Somehow, I suspect you already know that.

> Could you please adapt the docstring or, alternatively, highlight-regexp
> to match what is documented with what is observed?

Would it suffice to say "Note that in Fundamental mode, there's no
font lock, so overlays are always used"?  Or did you mean something
else?

Thanks.




This bug report was last modified 6 years and 360 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.