[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
- Re: [Emacs-diffs] master 51e7e46: Font-lock elisp macros/special forms dynamically, (continued)
- Re: [Emacs-diffs] master 51e7e46: Font-lock elisp macros/special forms dynamically, Artur Malabarba, 2015/03/17
- Re: [Emacs-diffs] master 51e7e46: Font-lock elisp macros/special forms dynamically, Stefan Monnier, 2015/03/17
- Re: [Emacs-diffs] master 51e7e46: Font-lock elisp macros/special forms dynamically, Nicolas Richard, 2015/03/17
- Re: [Emacs-diffs] master 51e7e46: Font-lock elisp macros/special forms dynamically, Tassilo Horn, 2015/03/18
- Re: [Emacs-diffs] master 51e7e46: Font-lock elisp macros/special forms dynamically, Artur Malabarba, 2015/03/18
- Re: [Emacs-diffs] master 51e7e46: Font-lock elisp macros/special forms dynamically, Dmitry Gutov, 2015/03/18
- Re: [Emacs-diffs] master 51e7e46: Font-lock elisp macros/special forms dynamically, Stefan Monnier, 2015/03/18
- Re: [Emacs-diffs] master 51e7e46: Font-lock elisp macros/special forms dynamically, Tassilo Horn, 2015/03/18
- Re: [Emacs-diffs] master 51e7e46: Font-lock elisp macros/special forms dynamically, Stefan Monnier, 2015/03/18
- Re: [Emacs-diffs] master 51e7e46: Font-lock elisp macros/special forms dynamically, Stefan Monnier, 2015/03/16
Re: [Emacs-diffs] master 51e7e46: Font-lock elisp macros/special forms dynamically,
Tassilo Horn <=
Re: [Emacs-diffs] master 51e7e46: Font-lock elisp macros/special forms dynamically, Artur Malabarba, 2015/03/15