954,228 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Emacs Syntax Highlighting in No Window Mode

I am working on Solaris 9 and using the emacs editor version 21.4. The problem is that when I use the emacs -nw command and turn the font-lock-mode on, I don't get the syntax highlighting by color like in the XWindow mode. The syntax highlighting is only done by bolding or by background coloring. The list-colors-display command also gives a blank window. I know that the terminal supports colors because when I use the ls --color command, the directories and executables are displayed in blue and green. Any idea on how I can get colors for emacs in the nw mode?

WolfPack
Postaholic
Moderator
2,051 posts since Jun 2005
Reputation Points: 572
Solved Threads: 115
 

Well, I haven't used emacs enough to know what I'm doing in regards to syntax coloring... :rolleyes:

I found a few links though:
To run emacs in text mode with syntax coloring

host:~> setenv TERMINFO /home/user/.terminfo
host:~> infocmp
host:~> emacs -nw
global-font-lock-mode
xterm-mouse-mode

I also found this mailing list where the user seemed to have the same problem you experience right now. Perhaps try some of the suggested tips. http://www.tutorials-blog.com/emacs/emacs-colors-73095/

John A
Vampirical Lurker
Team Colleague
7,630 posts since Apr 2006
Reputation Points: 2,240
Solved Threads: 339
 

Thanks for the links. I changed my TERM variable from xterm to xtermc and that did the trick. setenv TERM xtermc emacs -nw

WolfPack
Postaholic
Moderator
2,051 posts since Jun 2005
Reputation Points: 572
Solved Threads: 115
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: