unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stefan Monnier" <monnier+gnu/emacs/pretest@cs.yale.edu>
Cc: "Stefan Monnier" <monnier+gnu/emacs/pretest@cs.yale.edu>,
	acm@muc.de, bug-cc-mode@gnu.org, emacs-devel@gnu.org
Subject: Re: Advising in cc-awk.el and namespace
Date: Wed, 16 Jul 2003 11:28:40 -0400	[thread overview]
Message-ID: <200307161528.h6GFSeVB025808@rum.cs.yale.edu> (raw)
In-Reply-To: E19bCzq-0001Z8-I7@fencepost.gnu.org

>     A change at pos N potentially changes the output of syntax-ppss for
>     all pos>N, so jit-lock just refontifies everything (in the background
>     with jit-lock-stealth-*).  Of course, in practice the output of
>     syntax-ppss is generally not changed for all pos>N but only for N<pos<M
>     (or sometimes it is changed for all pos>N but the change is marginal or
>     irrelevant and will not influence the result of font-locking), so we could
>     be more clever, but we would need to cache the parse-state-before-change
>     so we can compare it to the parse-state-after-change so we can stop when
>     they are equal again.
> 
> It would not be hard to cache the syntactic state every N lines in a
> text property, and that way it would be possible to notice when
> things get back in sync and end refontification.
> 
> However, another solution is to stop refontifying at the next
> start-of-defun after the last change.  That should be really simple.
> Could someone give that a try?

That's a very good idea.
The only problem for is that we don't really have that info right now.
The only thing that jit-lock knows is whether to do the "contextual
refontification" or not.  Font-lock and syntax.el know a little bit more,
in that they know how to find the previous start-of-defun, but not the next
one (although depending on the value of font-lock-beginning-of-syntax-function
and/or syntax-begin-function, the next-start-of-defun can be inferred).


	Stefan



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0


  reply	other threads:[~2003-07-16 15:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200307091720.h69HKLEN015169@rum.cs.yale.edu>
2003-07-10 19:31 ` Advising in cc-awk.el and namespace Alan Mackenzie
2003-07-11 15:12   ` Stefan Monnier
2003-07-16 19:34     ` Martin Stjernholm
2003-07-11 17:21   ` Richard Stallman
2003-07-11 17:35     ` Stefan Monnier
2003-07-12  5:32       ` Richard Stallman
2003-07-16 15:28         ` Stefan Monnier [this message]
2003-07-17 23:55           ` Richard 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=200307161528.h6GFSeVB025808@rum.cs.yale.edu \
    --to=monnier+gnu/emacs/pretest@cs.yale.edu \
    --cc=acm@muc.de \
    --cc=bug-cc-mode@gnu.org \
    --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).