From: "Stefan Monnier" <monnier+gnu/emacs@cs.yale.edu>
Cc: emacs-devel@gnu.org
Subject: Re: font lock in gdb-script mode
Date: Wed, 23 Jul 2003 09:32:39 -0400 [thread overview]
Message-ID: <200307231332.h6NDWdRs030126@rum.cs.yale.edu> (raw)
In-Reply-To: 20030723.221818.47712410.jet@gyve.org
> I've modified font lock related code in gdb-script-mode a bit.
> Please, review my small patch.
>
> 2003-07-23 Masatake YAMATO <jet@gyve.org>
>
> * 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
next prev parent reply other threads:[~2003-07-23 13:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-23 13:18 font lock in gdb-script mode Masatake YAMATO
2003-07-23 13:32 ` Stefan Monnier [this message]
2003-07-24 19:59 ` Richard Stallman
2003-07-23 13:47 ` Andreas Schwab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200307231332.h6NDWdRs030126@rum.cs.yale.edu \
--to=monnier+gnu/emacs@cs.yale.edu \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).