GNU bug report logs - #16500
24.3.50; Wrong font-lock backquote highlighting in plan9 rc variant of sh-mode

Previous Next

Package: emacs;

Reported by: Mikhail Gusarov <dottedmag <at> dottedmag.net>

Date: Sun, 19 Jan 2014 18:49:02 UTC

Severity: minor

Found in version 24.3.50

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Mikhail Gusarov <dottedmag <at> dottedmag.net>
Cc: 16500 <at> debbugs.gnu.org
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
Mikhail Gusarov <dottedmag <at> 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




This bug report was last modified 1 year and 155 days ago.

Previous Next


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