* Use C syntax highlighting with other extension
@ 2009-03-20 23:45 spasmous2
2009-03-21 0:01 ` Marc Tfardy
2009-03-21 1:22 ` Pascal J. Bourguignon
0 siblings, 2 replies; 3+ messages in thread
From: spasmous2 @ 2009-03-20 23:45 UTC (permalink / raw)
To: help-gnu-emacs
I have some files that are mostly C code, but have an extension .d
rather than .c. How can I make emacs use C syntax highlighting with
these .d files? If I rename the files with a .c then all works nicely
but I would like to keep the .d extension. Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Use C syntax highlighting with other extension
2009-03-20 23:45 Use C syntax highlighting with other extension spasmous2
@ 2009-03-21 0:01 ` Marc Tfardy
2009-03-21 1:22 ` Pascal J. Bourguignon
1 sibling, 0 replies; 3+ messages in thread
From: Marc Tfardy @ 2009-03-21 0:01 UTC (permalink / raw)
To: help-gnu-emacs
spasmous2 schrieb:
> I have some files that are mostly C code, but have an extension .d
> rather than .c. How can I make emacs use C syntax highlighting with
> these .d files? If I rename the files with a .c then all works nicely
> but I would like to keep the .d extension. Thanks.
(add-to-list 'auto-mode-alist '("\\.d\\'" . c-mode))
regards
Marc
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Use C syntax highlighting with other extension
2009-03-20 23:45 Use C syntax highlighting with other extension spasmous2
2009-03-21 0:01 ` Marc Tfardy
@ 2009-03-21 1:22 ` Pascal J. Bourguignon
1 sibling, 0 replies; 3+ messages in thread
From: Pascal J. Bourguignon @ 2009-03-21 1:22 UTC (permalink / raw)
To: help-gnu-emacs
spasmous2 <spasmous@gmail.com> writes:
> I have some files that are mostly C code, but have an extension .d
> rather than .c. How can I make emacs use C syntax highlighting with
> these .d files? If I rename the files with a .c then all works nicely
> but I would like to keep the .d extension. Thanks.
If they are clisp sources, there's a file d-mode.el along the sources
that you can load in emacs.
There's a also a different d-mode.el for the D programming language,
but this has nothing to do with C. Are you sure your files are C
sources?
Otherwise see Marc's answer.
--
__Pascal Bourguignon__
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-03-21 1:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-20 23:45 Use C syntax highlighting with other extension spasmous2
2009-03-21 0:01 ` Marc Tfardy
2009-03-21 1:22 ` Pascal J. Bourguignon
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).