all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Sébastien Miquel" <sebastien.miquel@posteo.eu>
To: 46558@debbugs.gnu.org
Subject: bug#46558: Interaction between font-lock-extend-region-wholelines and font-lock-extend-region-multiline
Date: Tue, 16 Feb 2021 13:13:17 +0100	[thread overview]
Message-ID: <a34314b3-1873-78f1-536c-13e52ff92dc2@posteo.eu> (raw)

Hi,

In org-mode, blocks are fontified with the font-lock-multiline
property. When editing the line right before a block, the whole block
is needlessly refontified (use highlight-refontification-mode to
check).

This is because the font-lock-extend-region-wholelines extends the
region to the beginning of the next line, which has the
font-lock-multiline property. Then font-lock-extend-region-multiline
extends the region to the end of the block.

If a second block follows the first one, with no empty line between,
it is refontified as well.

Maybe font-lock-extend-region-multiline should check if the char
right before font-lock-end has the font-lock-multiline property as
well before extending the region. I've tried it, and haven't found any
issue in this use case.

-- 
Sébastien Miquel






             reply	other threads:[~2021-02-16 12:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-16 12:13 Sébastien Miquel [this message]
2022-06-17 15:19 ` bug#46558: Interaction between font-lock-extend-region-wholelines and font-lock-extend-region-multiline Lars Ingebrigtsen
2022-06-19 12:56   ` Sébastien Miquel
2022-06-19 13:13     ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a34314b3-1873-78f1-536c-13e52ff92dc2@posteo.eu \
    --to=sebastien.miquel@posteo.eu \
    --cc=46558@debbugs.gnu.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.