all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 20096@debbugs.gnu.org
Subject: bug#20096: 25.0.50; Add Font-Lock support for subr-x macros
Date: Sun, 15 Mar 2015 09:25:38 +0100	[thread overview]
Message-ID: <87ioe2mzul.fsf@gnu.org> (raw)
In-Reply-To: <jwvy4mzofdi.fsf-monnier+emacsbugs@gnu.org> (Stefan Monnier's message of "Sat, 14 Mar 2015 09:56:33 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> but the attached patch uses a regexp defconst with a matcher
>> function for font-lock-keywords.
>
> Looks good.

Committed as 51e7e463e93708a0e40688f91200e9e9869ec662 on master.

>> +(defun lisp--el-update-after-load (_file)
>> +  "Update `lisp--el-macro-regexp' and adjust font-lock in existing buffers."
>> +  (lisp--el-update-macro-regexp)
>> +  (dolist (buf (buffer-list))
>> +    (when (derived-mode-p 'emacs-lisp-mode)
>> +      (font-lock-flush))))
>
> I think we should only flush if the set of macros has changed.

Ok, I'm doing that now.

> Other than that, the patch looks good.
> Have you tried it?

Yes, but not long enough.  Some non-important special forms such as `if'
and `progn' weren't highlighted anymore.  So now I consider both macros
and special forms.

> Does it work well in practice?

IMO, yes.  The difference is that there are some macros which haven't
been highlighted previously, e.g., `push'.

Bye,
Tassilo





      reply	other threads:[~2015-03-15  8:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-12  8:42 bug#20096: 25.0.50; Add Font-Lock support for subr-x macros Tassilo Horn
2015-03-12 14:52 ` Stefan Monnier
2015-03-14  8:26   ` Tassilo Horn
2015-03-14 13:56     ` Stefan Monnier
2015-03-15  8:25       ` Tassilo Horn [this message]

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=87ioe2mzul.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=20096@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.