Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 3rd October 2008, 07:42 AM
daniel_I_l Offline
Registered User
 
Join Date: Jan 2007
Posts: 131
emacs: syntax highlighting

When I open a C file with emacs it's properly highlighted. But how can I get syntax highlighting in a new file? I tried turing on "font-lock-mode" and it didn't help. One site said to click on "options" in the toolbar and then check a box that says "enable highlighting" or something like that but I don't have that box.
Any ideas?
Thanks.
Reply With Quote
  #2  
Old 3rd October 2008, 08:46 AM
RupertPupkin's Avatar
RupertPupkin Offline
Registered User
 
Join Date: Nov 2006
Location: Detroit
Posts: 4,619
That should happen automatically when you name the file with a .c extension. If not, then just do this:
ESC-x c-mode

If that doesn't work, put this in your ~/.emacs:
Code:
(add-hook 'c-mode-hook 'turn-on-font-lock)
Reply With Quote
Reply

Tags
emacs, highlighting, syntax

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Turning on syntax highlighting in emacs GammaPoint Using Fedora 4 2nd May 2008 03:48 AM
VI syntax highlighting as root bbeverage Using Fedora 5 19th August 2006 10:33 PM
No syntax and color highlighting kishore25 Using Fedora 4 13th July 2006 08:57 AM
Emacs syntax highlighting wrong for c++ Anomaly Using Fedora 3 19th April 2005 08:51 AM


Current GMT-time: 19:17 (Friday, 24-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat