From: Lars Ingebrigtsen <larsi@gnus.org>
To: Mikhail Gusarov <dottedmag@dottedmag.net>
Cc: 16500@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 [thread overview]
Message-ID: <87a79iuym1.fsf@gnus.org> (raw)
In-Reply-To: <m2mwit4p8l.fsf@newton.dottedmag.net> (Mikhail Gusarov's message of "Sat, 18 Jan 2014 10:24:10 +0100")
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
next prev parent reply other threads:[~2019-10-30 13:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-18 9:24 bug#16500: 24.3.50; Wrong font-lock backquote highlighting in plan9 rc variant of sh-mode Mikhail Gusarov
2019-10-30 13:55 ` Lars Ingebrigtsen [this message]
2022-09-03 8:22 ` bug#16500: 24.3.50; Wrong font-lock backquote highlighting in plan9 rc Vasilij Schneidermann
2022-09-03 10:02 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a79iuym1.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=16500@debbugs.gnu.org \
--cc=dottedmag@dottedmag.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).