From: Alan Mackenzie <acm@muc.de>
Cc: bug-cc-mode@gnu.org, emacs-devel@gnu.org
Subject: Re: Advising in cc-awk.el and namespace
Date: Thu, 10 Jul 2003 19:31:48 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.3.96.1030710184802.178A-100000@acm.acm> (raw)
In-Reply-To: <200307091720.h69HKLEN015169@rum.cs.yale.edu>
[emacs-devel added to the To:]
On Wed, 9 Jul 2003, Stefan Monnier wrote:
>Regarding c-awk-advise-fl-for-awk-region:
A quick summary for others: c-awk-advise-fl-for-awk-region is a macro in
cc-awk.el which advises four font-lock functions (e.g.
font-lock-after-change-function) which get called as
after-change-functions. The advice changes the BEGIN and END arguments
to encompass the complete region which needs refontifying. This is done
by syntactically analysing the AWK mode buffer.
>It would really be helpful if package maintainers could tell us when
>they need an `advice'. It's generally a sign of a shortcoming in the
>basic functionality and so we need to know about it.
I posted "Subject: Font-lock: Major mode should be able to specify
region to fontify." in gnu.emacs.bug on 10 May 2002 21:31:03 +0200. This
post contained tentative patches for font-lock.el, jit-lock.el and
lazy-lock.el. It didn't spark off much discussion.
Personally, I dislike the way font-locking is done at the moment.
jit-lock-mode, though it speeds up the response of Emacs when first
loading a file, is very wasteful of processor cycles. On my 166MHz
machine (OK - but _somebody_'s got to keep pace with Dan J. :-), if I
load a large file (say, ..../emacs/src/keyboard.c) wait for jit-lock to
finish fontifying it in the background, then make a small change near the
beginning of this file, needlessly refontifying ~320kBytes consumes ~55%
of the CPU's power for 3½ minutes.
I have jit-lock-defer-contextually set to t, which is what causes the
above. However, if the major mode were to specify the region to
font-lock, jit-lock deferred "contextual" fontification would never be
needed.
Also, jit-lock sometimes MIS-fontifies code (for example, in Texinfo
mode, if Auto Fill mode breaks up an @code{...} thing, for example, the
new line gets the proper face to begin with, but loses it 3 seconds
later. This happens because jit-lock yanks that line from its syntactic
context before refontifying it. I'm talking about the jit-lock that was
shipped with Emacs 21.1. Sorry if these things have since been fixed.
[ .... ]
> Stefan
--
Alan Mackenzie (Munich, Germany)
next parent reply other threads:[~2003-07-10 19:31 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 ` Alan Mackenzie [this message]
2003-07-11 15:12 ` Advising in cc-awk.el and namespace 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
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=Pine.LNX.3.96.1030710184802.178A-100000@acm.acm \
--to=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).