all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tom Oswald <toswald@sharplabs.com>
Subject: Re: How do I get emacs to highlight subroutine calls in c-mode.
Date: Thu, 16 Oct 2003 12:36:52 -0700	[thread overview]
Message-ID: <votsk690nobs13@corp.supernews.com> (raw)
In-Reply-To: <mailman.1544.1065932192.21628.help-gnu-emacs@gnu.org>

jan wrote:
> lawrence mitchell <wence@gmx.li> writes:
> 
> 
>>>(bind-hook c-mode-hook
>>
>>   ^^^^^^^^^^^^^^^^^^^^^
>>You probably meant:
>>
>> (add-hook 'c-mode-hook
>>
>>
>>>	(font-lock-add-keywords nil
>>>		'(("\\<\\(\\sw+\\) ?(" 1 font-lock-function-call-face))) t))
> 
> 
> Yes, sorry, I didn't test the code I posted, I just extracted the
> relevant looking parts from my init files and accidentally included my
> bind-hook macro. Here is a tested version
> 
> ;; turn on font lock with maximum decoration
> (global-font-lock-mode t)
> (setq font-lock-maximum-decoration t)
> 
> (require 'font-lock)
> 
> ;; create a face for function calls
> (defface font-lock-function-call-face
>   '((t (:foreground "DarkBlue")))
>   "Font Lock mode face used to highlight function calls."
>   :group 'font-lock-highlighting-faces)
> (defvar font-lock-function-call-face 'font-lock-function-call-face)
> 
> ;; add it to the font lock tables
> (add-hook 'c-mode-hook
> 	  (lambda ()
> 	    (font-lock-add-keywords
> 	     nil
> 	     '(("\\<\\(\\sw+\\) ?(" 1 font-lock-function-call-face)) t)))
> 

How would I add italic to the display?  At present it displays the function 
names in "DarkBlue".  What would be required to display function names in 
"DarkBlue" plus italics?

Tom

  parent reply	other threads:[~2003-10-16 19:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-10 20:47 How do I get emacs to highlight subroutine calls in c-mode Tom Oswald
     [not found] ` <mailman.1526.1065861258.21628.help-gnu-emacs@gnu.org>
2003-10-11 12:21   ` lawrence mitchell
2003-10-12 21:26     ` jan
     [not found]     ` <mailman.1544.1065932192.21628.help-gnu-emacs@gnu.org>
2003-10-13 13:44       ` Javier Oviedo
2003-10-17 17:40         ` jan
2003-10-16 19:36       ` Tom Oswald [this message]
2003-10-12  1:43 ` jan

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=votsk690nobs13@corp.supernews.com \
    --to=toswald@sharplabs.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.