Hi,all~
I heard that emacs could supply syntax highlight for some programming languages such as C++, how to customize that please ? and what languages could enjoy that ?
thanx in advance~
Hi,all~
I heard that emacs could supply syntax highlight for some programming languages such as C++, how to customize that please ? and what languages could enjoy that ?
thanx in advance~
Never end on learning~
ISBN: 1565921526
It says how to do it in this book. You have to know what transient mode is.
I think that this information is available online as well.
< http://www.cs.utah.edu/dept/old/texi...emacs_toc.html >
Last edited by Troll_King; 09-28-2002 at 05:08 AM.
Ye, emacs can highlight syntax, there's many options that you can use to highlight keywords etc.
it's well documented, and explains alot, but it's quite easy to use if you only want to highlight key words in your syntax, there should be a menu on emacs called options, check it out.
thanx for Troll_King, I'll check that for help~
also thanx for K.A.J, I have that options menu but find no item about syntax highlight etc. my OS is RedHat7.1, could you show me something in details ?
Never end on learning~
i recommend updating your emacs version before going on. the one that comes with redhat 7.1 is outdated, imho. not that it won't work, but the newer emacs has some extra features that relate to graphics.
anyway, what kind of change do you want to make? emacs should come with c++ syntax highlighting already.
Emacs hilighting can suck my [edited]. Did you see Mandrake 9.0? It's the best OS i've ever seen.
Whenever I save a file as a .c or a .cpp, it highlights the syntax for me. I didnt have to change any options for that, I guess it came setup for me.
-MethodMan-
Your Move:Life is a game, Play it; Life is a challenge, Meet it; Life is an opportunity, capture it.
Homepage: http://www.freewebs.com/andy_moog/home.html
I'd like to practise with emacs about C++ and Python. I think my old version one didnt support Python as well~Originally posted by ygfperson
i recommend updating your emacs version before going on. the one that comes with redhat 7.1 is outdated, imho. not that it won't work, but the newer emacs has some extra features that relate to graphics.
anyway, what kind of change do you want to make? emacs should come with c++ syntax highlighting already.
Never end on learning~
Like this. I hope Dean isn't stuck using GNU style?Code:(set-background-color "wheat") (line-number-mode 1) (column-number-mode 1) (global-font-lock-mode) (setq visible-bell t) (setq auto-mode-alist (append '(("\\.h$" . c++-mode)) auto-mode-alist)) (add-hook 'c-mode-common-hook (lambda () (c-set-style "stroustrup") (setq c-basic-offset 4))) (custom-set-variables) (custom-set-faces '(font-lock-comment-face ((((class color) (background light)) (:foreground "Sienna")))) '(font-lock-string-face ((((class color) (background light)) (:foreground "DarkGreen")))) '(font-lock-keyword-face ((((class color) (background light)) (:foreground "Firebrick")))\ ) '(font-lock-constant-face ((((class color) (background light)) (:foreground "Navy")))) '(font-lock-variable-name-face ((((class color) (background light)) (:foreground "Navy"))\ )) '(font-lock-builtin-face ((((class color) (background light)) (:foreground "Navy")))))
nick, that is out of your .emacs file?
'During my service in the United States Congress, I took the initiative in creating the Internet.' - Al Gore, March 9, 1999: On CNN's Late Edition
Yeah, it's a pretty simple one.