|
From: | Bozhidar Batsov |
Subject: | bug#15219: Emacs Lisp mode and Lisp mode font-locking |
Date: | Fri, 30 Aug 2013 16:23:37 +0300 |
I've noticed something odd about the font-locking in Emacs Lisp mode andLisp mode - keyword args are highlighted using the font-lock-builtin-faceand constructs like &optional are highlighted usingfont-lock-type-face. I guess this was was done way back and hasn't beenupdated in a while, but I think it might a good idea to revise this. Prettysure those font faces are intended for different usage. I think it would begreat if all Emacs programming modes used the built-in font-lock facesconsistently, so that the meaning of certain faces doesn't change from modeto mode. I guess that the two modes might also start using thefont-lock-built-in face to highlight their core functions (like car, cdr,mapcar, mapc, etc) - as Clojure mode does. Personally I feel that uses ofthe keyword face for things that are not special forms (like the when macro)should be replaced with uses of the built-in face.Which things are special forms and which things are macros issomewhat arbitrary. The important thing to know about them is thatthey're not functions, so their arguments may not be evaluated in theusual way.
Also macros are used to introduce new syntactic constructs: in normalprogramming languages, something like `when' would be highlighted asa `keyword', not as a `builtin'.I'm not completely sure what the `builtin' is used for, usually.What information is it meant to provide?
I mean, do you consider`mapcar' "builtin" because it's fast? Because it's implemented in C?Because it's predefined (no need for any kind of autoloading/require)?Is `car' builtin because "if you didn't have it, you'd have to inventit" (IOW can't be implemented in Elisp)?
Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |