emacs-devel
[Top][All Lists]
Advanced

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

Re: font lock in gdb-script mode


From: Stefan Monnier
Subject: Re: font lock in gdb-script mode
Date: Wed, 23 Jul 2003 09:32:39 -0400

> I've modified font lock related code in gdb-script-mode a bit.
> Please, review my small patch.
> 
> 2003-07-23  Masatake YAMATO  <address@hidden>
> 
>       * progmodes/gud.el (gdb-script-font-lock-keywords): 
>       Put `font-lock-function-name-face' on a symbol which includes
>       `-' like `hook-run'. Put `font-lock-function-name-face' on
>       a symbol after `document'. Put font-lock-variable-name-face 
>       on a symbol starting with $.
> 
> 
> Index: lisp/progmodes/gud.el
> ===================================================================
> RCS file: /cvsroot/emacs/emacs/lisp/progmodes/gud.el,v
> retrieving revision 1.3
> diff -u -r1.3 gud.el
> --- lisp/progmodes/gud.el     18 Jun 2003 23:26:28 -0000      1.3
> +++ lisp/progmodes/gud.el     23 Jul 2003 13:10:51 -0000
> @@ -2892,7 +2892,9 @@
>      st))
>  
>  (defvar gdb-script-font-lock-keywords
> -  '(("^define\\s-+\\(\\w+\\)" (1 font-lock-function-name-face))
> +  '(("^define\\s-+\\(\\(\\w\\|-\\)+\\)" (1 font-lock-function-name-face))

Looks good (maybe we should use \\s_ instead of -, tho).

> +    ("^document\\s-+\\(\\(\\w\\|-\\)+\\)" (1 font-lock-function-name-face))

I must say I consciously did not do it, because I liked the fact
that the function-name face was only put on the definition (I always
put the documentation right next to it, so highlighting it a second
time there is not helpful).

> +    ("$\\(\\w+\\)" (1 font-lock-variable-name-face))

Sounds good.


        Stefan





reply via email to

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