emacs-devel
[Top][All Lists]
Advanced

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

Re: Request: add cl-font-lock to Emacs or Elpa


From: Spenser Truex
Subject: Re: Request: add cl-font-lock to Emacs or Elpa
Date: Sat, 21 Mar 2020 15:40:59 -0700

Stefan Monnier <address@hidden> writes:

>> Since we are trying to get this into lisp-mode.el at this point, I'm
>> going to refrain from further renaming.
>
> Agreed.
>
>> As for the question of my FSF paperwork, I'm currently in a state of
>> limbo. I have submitted my papers, but the president of the institution
>> in my signature is apparently too busy to sign.
>
> Let's hope patience will resolve this problem.

Indeed, with current events it is unlikely to be resolved. Currently I
have waited 9 months. The email is address@hidden.

>
>> I hope that my limited contribution to the project will permit this to
>> be looked over.
>
> Could be, but I don't know which part you have contributed (I've already
> asked twice what has contributed what but haven't seen any answer to the
> question yet ;-( ), so I can't judge it.
>

I've done a git-blame for myself. Here is the code I added. Before I
contributed the macro the code repeated the pattern it generates.

(defmacro font-lock-cl-add-regexes (fn mode &rest symbol-face)
  "Expand to more than one call to font-lock.
Argument FN is the function used to send off the regex. Commonly
`font-lock-add-keywords' or `font-lock-remove-keywords'. Argument
MODE is the mode where the regexes are sent.
Optional argument SYMBOL-FACE dotted-pair of (regex-var . font-face)."
  `(progn
     ,@(cl-loop for s in symbol-face
                collect
                `(,fn
                  ',mode
                  `((,(regexp-opt ,(car s) 'symbols)
                     . ,(cdr ',s)))))))

(font-lock-cl-add-regexes
 font-lock-add-keywords
 lisp-mode
 (font-lock-cl-built-in--functions . font-lock-function-name-face)
 (font-lock-cl-built-in--variables . font-lock-variable-name-face)
 (font-lock-cl-built-in--types . font-lock-type-face)
 (font-lock-cl-built-in--symbols . font-lock-builtin-face)
 (font-lock-cl--character-names . font-lock-variable-name-face))


-- 
Spenser Truex
spensertruex.com
San Francisco, USA



reply via email to

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