From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Lennart Borgman <lennart.borgman@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Need help with search based font-locking
Date: Wed, 23 Dec 2009 23:46:23 -0500 [thread overview]
Message-ID: <jwv1vil0ypz.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <e01d8a50912231945p6cf99214nd5f3e62c6d47a0d6@mail.gmail.com> (Lennart Borgman's message of "Thu, 24 Dec 2009 04:45:35 +0100")
> + (defun lock-font-refresh-defaults ()
> + "Refresh defaults and restart fontification.
> + Set defaults again as if function `font-lock-defaults' had not
> + been called and then restart fontification."
> + (before-lock-mode -1)
> + (kill-local-variable 'font-lock-set-defaults)
> + (font-lock-mode 1))
I thought I was the only one who could muster so many typos in so few
lines. BTW, the docstring should be more radical without reference to
internal functions like font-lock-set-defaults, as in "Restart,
recomputing everything from scratch" and then explain that it's
typically used to let font-lock react to external changes in variables
like font-lock-defaults and keywords.
Stefan
next prev parent reply other threads:[~2009-12-24 4:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-22 21:45 Need help with search based font-locking Tassilo Horn
2009-12-22 22:43 ` Lennart Borgman
2009-12-23 11:13 ` Tassilo Horn
2009-12-23 11:38 ` Tassilo Horn
2009-12-24 3:07 ` Stefan Monnier
2009-12-24 3:45 ` Lennart Borgman
2009-12-24 4:46 ` Stefan Monnier [this message]
2009-12-24 13:48 ` Lennart Borgman
2009-12-28 13:20 ` Tassilo Horn
2009-12-28 13:54 ` Lennart Borgman
2009-12-28 18:18 ` Tassilo Horn
2009-12-30 13:56 ` Tassilo Horn
2009-12-30 15:29 ` Stefan Monnier
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=jwv1vil0ypz.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=lennart.borgman@gmail.com \
/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.