emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] master 51e7e46: Font-lock elisp macros/special forms d


From: Tassilo Horn
Subject: Re: [Emacs-diffs] master 51e7e46: Font-lock elisp macros/special forms dynamically
Date: Mon, 16 Mar 2015 08:41:39 +0100
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> Instead of updating a big macro regexp after load, there should be a
>> `declare' attribute that would let specific macros (and functions)
>> opt into being fontified specially.
>
> Maybe the other way around would be better: add a declaration that
> says "this macro faithfully mimicks the behavior of a function".

Both opt-in and opt-out sound reasonable to me, and I don't have a
preference.  So just tell me what you prefer.

AFAICS, I'd need to add a new `(no-)font-lock-keyword' entry to
`macro-declarations-alist' and then check (get macro
'(no-)font-lock-keyword) in the code building the regex, right?  Or in
case of opt-in, (declare 'font-lock-keyword) could add the symbol to a
list of macros to font-lock as keywords so that we don't need to check
all symbols in `obarray'.

The name (no-)font-lock-keyword is open to discussion, of course.

Also, I'd like to rename the new lisp--el-*-macro-* symbols to
lisp--el-*-keyword-* since they deal with both macros and special forms,
i.e., they deal with stuff font-locked with keyword face.

Bye,
Tassilo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]