all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* c-mode question, emacs specific
@ 2004-03-08  0:32 C-turtle
  2004-03-08  0:58 ` Pascal Bourguignon
  0 siblings, 1 reply; 2+ messages in thread
From: C-turtle @ 2004-03-08  0:32 UTC (permalink / raw)


Inside emacs:
In the c-mode I have a keyword INT defined in one
of two almost equivalent ways:

typedef int INT;
#define INT int

and I want it to highlight just as int and treat it as int inside
emacs.

It may take many years to implement such a functionality to
use typedefs intelligently, but it may be possible to 
to hardwire INT as a reserved word in the same category as
int.

How can I do it??? Please, explain a little as you put your
solution.

C-turtle



-=-
This message was posted via two or more anonymous remailing services.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: c-mode question, emacs specific
  2004-03-08  0:32 c-mode question, emacs specific C-turtle
@ 2004-03-08  0:58 ` Pascal Bourguignon
  0 siblings, 0 replies; 2+ messages in thread
From: Pascal Bourguignon @ 2004-03-08  0:58 UTC (permalink / raw)


Anonymous-Remailer@See.Comment.Header (C-turtle) writes:
> typedef int INT;
> #define INT int
> 
> and I want it to highlight just as int and treat it as int inside
> emacs.
> How can I do it??? Please, explain a little as you put your
> solution.

Customize this variable: font-lock-extra-types

For example, I have:

(custom-set-variables
    ;; ...
    '(font-lock-extra-types (quote ("FILE" "\\sw+_t" "[A-Z][A-Za-z]+[A-Z][A-Za-z0-9]+" "bool" "INT8" "INT16" "INT32" "CARD8" "CARD16" "CARD32" "SignT" "CHAR" "UNICODE" "DECIMAL" "ADDRESS" "CSTRING255" "CSTRING63" "CSTRING31" "BOOLEAN")) t)
    ;; ...
)


-- 
__Pascal_Bourguignon__                     http://www.informatimago.com/
There is no worse tyranny than to force a man to pay for what he doesn't
want merely because you think it would be good for him.--Robert Heinlein
http://www.theadvocates.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-03-08  0:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-08  0:32 c-mode question, emacs specific C-turtle
2004-03-08  0:58 ` Pascal Bourguignon

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.