unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#31915: 26.0.50; highlight-regexp does not highlight regexp
@ 2018-06-20 16:26 Markus Triska
  2018-06-20 17:07 ` Eli Zaretskii
  2018-06-20 17:32 ` Michael Heerdegen
  0 siblings, 2 replies; 5+ messages in thread
From: Markus Triska @ 2018-06-20 16:26 UTC (permalink / raw)
  To: 31915


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. However, only the first "x" is highlighted.

Could you please adapt the docstring or, alternatively, highlight-regexp
to match what is documented with what is observed? Personally, I would
prefer that also the second "x" be highlighted in this case. Thank you!


In GNU Emacs 26.0.50.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw scroll bars)
 of 2016-10-21 built on my computer
Repository revision: 0929e061fb544c0f4c10ff0412a41cf7e8148270
System Description:	Debian GNU/Linux 9.3 (stretch)


Configured using:
 'configure --with-gif=no --with-tiff=no --with-gnutls=no'

Configured features:
XPM JPEG PNG SOUND NOTIFY FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS LUCID
X11






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-06-20 21:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-20 16:26 bug#31915: 26.0.50; highlight-regexp does not highlight regexp Markus Triska
2018-06-20 17:07 ` Eli Zaretskii
2018-06-20 21:22   ` Markus Triska
2018-06-20 17:32 ` Michael Heerdegen
2018-06-20 21:26   ` Markus Triska

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).