O*D 发帖数: 17 | 1 Hi all,
I have a question about XEmacs lisp extension.
In C++-mode, font lock recognizes int, float etc as types and highlight
them using font-lock-type-face. Yet it does not font lock on extended types
for instance time_t and iterator.
Emacs fontifies these names by default and one can append whatever he wants
to the list c++-font-lock-extra-types. And if your company decided all the
classes in its application code would conform to a name convention class
TC***,
you can add a regexp to the list | t****a 发帖数: 1 | 2 Hi, I have a quite close question.
Suppose the int is by default shown in red color,
can I change it to green, for example? how?
Thanks a lot.
This
XEmacs.
【在 O*D 的大作中提到】 : Hi all, : I have a question about XEmacs lisp extension. : In C++-mode, font lock recognizes int, float etc as types and highlight : them using font-lock-type-face. Yet it does not font lock on extended types : for instance time_t and iterator. : Emacs fontifies these names by default and one can append whatever he wants : to the list c++-font-lock-extra-types. And if your company decided all the : classes in its application code would conform to a name convention class : TC***, : you can add a regexp to the list
| O*D 发帖数: 17 | 3 you can customize font lock faces. change the highlight color, font of type
names is trivial in Xemacs.
If you want to do more than that, say create your own faces, I do not know a
easy way which led to my first question.
Anyhow, I am the ROOT of my machine, so I did the nasty thing of editing
fontlock.el in Xemacs lisp package. By that I solve some of my problem, but
still kinda hard to customize in init.el or .emacs.
types
wants
【在 t****a 的大作中提到】 : Hi, I have a quite close question. : Suppose the int is by default shown in red color, : can I change it to green, for example? how? : Thanks a lot. : : This : XEmacs.
|
|