unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Gregory Heytings <gregory@heytings.org>
Cc: 56848-done@debbugs.gnu.org, control@debbugs.gnu.org
Subject: bug#56848: CC Mode fontification bug
Date: Sun, 15 Jan 2023 12:32:31 +0000	[thread overview]
Message-ID: <Y8PyX9jH/utJbUXc@ACM> (raw)
In-Reply-To: <8aadf0ddd557c31535cf@heytings.org>

reopen 56848
quit

Hello, Gregory.

Thanks for the Cc:!

I'm (trying to) reopen the bug with this post.

On Sat, Jan 14, 2023 at 21:28:24 +0000, Gregory Heytings wrote:

> Closing this bug.  The proposed patch has been included in commits 
> 4bd8ad2bc5 and 1cbc22b9c7.

I wasn't previously aware of this bug.  I'm not at all happy about the
patches you proposed and have applied.  In particular, you say
(2022-07-31):

> When font locking has already put, say, a font-lock-comment-face, or a
> font-lock-function-name-face, or a font-lock-variable-name-face on an
> occurrence of that identifier, there is no reason to undo that.  It is
> only occurrences that have been marked as "fontified" but on which no
> face has been put that should be unfontified.

, without justification.  There are circumstances in which identifiers
with font-lock-type-face need to be refontified with
font-lock-variable-face, and the reverse, amongs others.  It was trying
to optimise in this area which caused some of Po Lu's bug reports over
the last three months.

An example of what can go wrong is, supposing we have just mistyped

    food sausage;

as

    foo sausage;

..  "All" the identifiers "foo" throughout the buffer will get fontified
with type-face.  On returning to the line and correcting "foo" to
"food", these "foo"s need to be refontified.  This actual scenario
occurred in one of Po's bug reports.

I think that after the patches in this bug, the refontification won't
happen.  I've reopened the bug, and I'm asking you to reconsider these
things.

Thanks!

-- 
Alan Mackenzie (Nuremberg, Germany).





  reply	other threads:[~2023-01-15 12:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-31  0:16 bug#56848: CC Mode fontification bug Gregory Heytings
2022-07-31  5:47 ` Eli Zaretskii
2022-07-31  8:08   ` Gregory Heytings
2023-01-14 21:28 ` Gregory Heytings
2023-01-15 12:32   ` Alan Mackenzie [this message]
2023-01-15 12:52     ` Gregory Heytings

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=Y8PyX9jH/utJbUXc@ACM \
    --to=acm@muc.de \
    --cc=56848-done@debbugs.gnu.org \
    --cc=control@debbugs.gnu.org \
    --cc=gregory@heytings.org \
    /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).