By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,606 Members | 2,019 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,606 IT Pros & Developers. It's quick & easy.

Xemacs syntax highlighting

P: n/a
I use xemacs and syntax highlighting for my IDE, but I'm not a big
fan of the default syntax highlighting colors. For instance,
in 'def fun():' both 'def' and 'fun' are the same color. I kind of
like the vim colors, but what would be really useful is to find
various examples of highlighting that people have used, to see
which ones just look right. I looked through google groups but
didn't find any source of highlighting examples. Is there such a
resource?
Jul 18 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
Jay Davis wrote:
I use xemacs and syntax highlighting for my IDE, but I'm not a big
fan of the default syntax highlighting colors. For instance,
in 'def fun():' both 'def' and 'fun' are the same color.


Funny you should mention this -- just today I set up
some custom colours for xemacs. I have my keywords set
to blue and function names to red (which is what it
used to be like in an earlier version of xemacs, and
I liked it better that way.)

My .emacs file currently contains:

(require 'font-lock)
(set-face-foreground 'font-lock-function-name-face "red3")
(set-face-foreground 'font-lock-keyword-face "blue3")
(set-face-foreground 'font-lock-comment-face "dark green")
(set-face-foreground 'font-lock-type-face "blue3")

--
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg

Jul 18 '05 #2

P: n/a

Jay> I use xemacs and syntax highlighting for my IDE, but I'm not a big
Jay> fan of the default syntax highlighting colors. For instance, in
Jay> 'def fun():' both 'def' and 'fun' are the same color.

What version of python-mode.el are you using? I use the latest version from
CVS (4.51). "def" is a purplish color (as are all keywords). The function
name is a reddish color. Strings are green. Comments are blue. None of
the colors are too saturated though so even though it sounds garish it's not
too hard on the eyes. The version which comes with the Python distribution
(4.41) probably uses the same color scheme. I don't think much has changed
in that regard recently.

Skip
Jul 18 '05 #3

P: n/a
>>>>> "Skip" == Skip Montanaro <sk**@pobox.com> writes:

Skip> name is a reddish color. Strings are green. Comments are
Skip> blue. None of the colors are too saturated though so even
Skip> though it sounds garish it's not too hard on the eyes. The

Aren't the actual, physical colors more of a global emacs issue,
rather than an issue w/ python-mode.el? I'm using color-theme.el
myself:

http://www.emacswiki.org/cgi-bin/wiki/ColorTheme

I urge everyone to check it out, esp. if you spend >= 8 hours a day
staring at emacs windows :).

--
Ville Vainio http://tinyurl.com/2prnb
Jul 18 '05 #4

P: n/a
In article <ma**************************************@python.o rg>,
Skip Montanaro <sk**@pobox.com> wrote:
What version of python-mode.el are you using? I use the latest version from
CVS (4.51).
I just downloaded python-mode.el a couple of days ago from
www.python.org and got version 4.6, for use with GNU Emacs 21.2.1 on my
Mac OSX box.
"def" is a purplish color (as are all keywords). The function
name is a reddish color. Strings are green. Comments are blue.


I'm getting keywords in teal (sort of a light blue), function names in
dark blue, strings in green, and comments in red. Everything else in
black.
Jul 18 '05 #5

P: n/a
What version of python-mode.el are you using? I use the latest
version from CVS (4.51).


Roy> I just downloaded python-mode.el a couple of days ago from
Roy> www.python.org and got version 4.6, for use with GNU Emacs 21.2.1
Roy> on my Mac OSX box.

Hmmm... I'll have to track that down and update it. I don't see
python-mode.el in the source for the python.org website. Do you have a URL?

Try the version here instead:

http://cvs.sourceforge.net/viewcvs.p...e/python-mode/

Although as others have pointed out this may be more of a GNU Emacs config
issue. Python-mode tries to use the font highlighting capabilities of the
system it's running on.

Skip

Jul 18 '05 #6

P: n/a

Skip> name is a reddish color. Strings are green. Comments are blue.
Skip> None of the colors are too saturated though so even though it
Skip> sounds garish it's not too hard on the eyes. The

Ville> Aren't the actual, physical colors more of a global emacs issue,
Ville> rather than an issue w/ python-mode.el?

Ah, perhaps you're right. In which case the OP probably just needs to
upgrade to a recent version of XEmacs. ;-)

Ville> I'm using color-theme.el myself:

Ville> http://www.emacswiki.org/cgi-bin/wiki/ColorTheme

Ville> I urge everyone to check it out, esp. if you spend >= 8 hours a
Ville> day staring at emacs windows :).

Thanks for the suggestion. Got a favorite theme for Python bufferrs or do
you rotate through a small set of themes to give your eyes a break?

Skip

Jul 18 '05 #7

P: n/a

Roy> BTW, although Apple ships OSX with both emacs and python
Roy> pre-installed, they don't include the python-mode.el. Any idea
Roy> what the best way is to suggest to Apple that they include it?

Nope. You might ask on py***********@python.org. I don't know if Jack
Jansen channels Steve Jobs or not, but I think Chuq von Rospach keeps an eye
on that list. I would think if anyone could squeeze python-mode.el into a
future release he could.

Roy> They also ship python without gnu readline enabled :-(

That's the joy of being able to build from source. :-)

turn-that-frown-upside-down-ly, y'rs,

Skip
Jul 18 '05 #8

P: n/a

On Mar 12, 2004, at 9:53 AM, Skip Montanaro wrote:
What version of python-mode.el are you using? I use the latest
version from CVS (4.51).

Roy> I just downloaded python-mode.el a couple of days ago from
Roy> www.python.org and got version 4.6, for use with GNU Emacs
21.2.1
Roy> on my Mac OSX box.

Hmmm... I'll have to track that down and update it. I don't see
python-mode.el in the source for the python.org website. Do you have
a URL?


It's at http://www.python.org/emacs/python-mode/. This also happens to
be google hit #1 for "python emacs mode" :-)

Try the version here instead:

http://cvs.sourceforge.net/viewcvs.p...e/python-mode/


I'll give that a shot, thanks.

BTW, although Apple ships OSX with both emacs and python pre-installed,
they don't include the python-mode.el. Any idea what the best way is
to suggest to Apple that they include it?

They also ship python without gnu readline enabled :-(
Jul 18 '05 #9

P: n/a
>>>>> "Skip" == Skip Montanaro <sk**@pobox.com> writes:

Ville> I'm using color-theme.el myself:

Ville> http://www.emacswiki.org/cgi-bin/wiki/ColorTheme

Ville> I urge everyone to check it out, esp. if you spend >= 8
Ville> hours a day staring at emacs windows :).

Skip> Thanks for the suggestion. Got a favorite theme for Python
Skip> bufferrs or do you rotate through a small set of themes to
Skip> give your eyes a break?

Actually, I mostly stare C++ code, and use the same color theme for
all my emacsing. I use color-theme-midnight at work (LCD) because of
the peaceful contrast, and color-theme-clarity at home on my low end
CRT. Both have a black background. Some day I should find the energy
to go through all the color themes :).

--
Ville Vainio http://tinyurl.com/2prnb
Jul 18 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.