bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16500: 24.3.50; Wrong font-lock backquote highlighting in plan9 rc v


From: Lars Ingebrigtsen
Subject: bug#16500: 24.3.50; Wrong font-lock backquote highlighting in plan9 rc variant of sh-mode
Date: Wed, 30 Oct 2019 14:55:18 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Mikhail Gusarov <dottedmag@dottedmag.net> writes:

> sh-quoted-exec face recognized by rc variant of sh-mode is not
> terminated at the end of quoted expression. To reproduce this bug,
> enable the font lock and open the following file in Emacs
> (alternatively remove {} around foo):
> ----------------------------------------------------------------------
> #!rc
>
> `{foo}   bar
> baz
> ----------------------------------------------------------------------
>
> Check with e.g. what-cursor-position that sh-quoted-exec face is
> continuing until the end of file, or up to a next ` symbol.
>
> sh-quoted-exec face should apply only to the closing } symbol, or,
> if the word quoted is not bracketed, to the end of word.

The problem here seems to be that ` is defined in the syntax table to be
a quote character, so `parse-partial-sexp` will skip to the end of the
buffer (or the next ` character) in
font-lock-fontify-syntactically-region.

I'm trying to familiarise myself with how font locking is supposed to
work -- anybody know what I should be poking into to get this to work
better?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]