unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
Cc: emacs-devel@gnu.org
Subject: Re: jit-lock doesn't honor font-lock-lines-before
Date: Thu, 01 Sep 2005 08:22:46 +0200	[thread overview]
Message-ID: <43169E36.6090802@gmx.at> (raw)
In-Reply-To: <E1EAGOG-00040z-G1@fencepost.gnu.org>

 >     Because this means that every time I insert one character, redisplay
 >     would refontify `font-lock-lines-before' in addition to the current
 >     line.
 >
 > Would that be bad?

It would slow down editing long lines.  jit-lock is supposed to make
editing faster.

 >
 >       Whether and when these lines are refontified
 >     would be _also_ decided by the redisplay engine.  And the latter doesn't
 >     know about `font-lock-lines-before'.  For example, editing the first
 >     line in a window would not "include the line before in refontification".
 >
 > This is a good point.  However, it can probably be fixed by a change in
 > the fontification function--when it is called, it should extend the starting
 > point for refontification upward by the specified number of lines.
 > (This might be the only fix needed.)
 >
 >

In `font-lock-default-fontify-region', immediately before the comment

           ;; check to see if we should expand the beg/end area for
           ;; proper multiline matches

insert either

           (setq beg (line-beginning-position (1- font-lock-lines-before)))

or - but this would have to be mentioned in the doc-string of
`font-lock-lines-before' -

           (when font-lock-multiline
             (setq beg (line-beginning-position (1- font-lock-lines-before))))

remove the corresponding line from `font-lock-after-change-function' and
wait what happens?  I'm still sceptical, though ... fontifications would
always overlap by `font-lock-lines-before' lines.

  reply	other threads:[~2005-09-01  6:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-28 13:08 jit-lock doesn't honor font-lock-lines-before martin rudalics
2005-08-29  8:39 ` Richard M. Stallman
2005-08-30  6:54   ` martin rudalics
2005-08-31  0:23     ` Richard M. Stallman
2005-09-01  6:22       ` martin rudalics [this message]
2005-09-01 14:11         ` Stefan Monnier
2005-09-02  5:24           ` martin rudalics
2005-09-02  6:04         ` Richard M. Stallman
2005-09-02 14:30           ` Stefan Monnier
2005-08-31 14:36     ` Richard M. Stallman
2005-08-29 14:13 ` Stefan Monnier
2005-08-30 12:11   ` martin rudalics
2005-08-31  2:47     ` Stefan Monnier
2005-09-01  6:24       ` martin rudalics
2005-09-01 13:49         ` Stefan Monnier
2005-09-02  6:05           ` Richard M. Stallman
2005-09-02 18:45             ` Stefan Monnier
2005-09-03  9:07               ` Richard M. Stallman

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=43169E36.6090802@gmx.at \
    --to=rudalics@gmx.at \
    --cc=emacs-devel@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 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).