all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: jan <janmar@iprimus.com.au>
Cc: help-gnu-emacs@gnu.org
Subject: Re: How do I get emacs to highlight subroutine calls in c-mode.
Date: 11 Oct 2003 18:43:58 -0700	[thread overview]
Message-ID: <un0c7b57l.fsf@iprimus.com.au> (raw)
In-Reply-To: <voe6hbmp6d8u9e@corp.supernews.com>


> I would like subroutine calls hightlighted.  For example, in
> "callThisSub(param1)" enacs would highlight "callThisSub".

(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 
(bind-hook c-mode-hook
	(font-lock-add-keywords nil
		'(("\\<\\(\\sw+\\) ?(" 1 font-lock-function-call-face))) t))

try placing this in your .emacs file.

-- 
jan

      parent reply	other threads:[~2003-10-12  1:43 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
2003-10-12  1:43 ` jan [this message]

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=un0c7b57l.fsf@iprimus.com.au \
    --to=janmar@iprimus.com.au \
    --cc=help-gnu-emacs@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 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.