Colors in Emacs (Was Re: [Maxima] Font-lock in *maxima* buffer)



C Y <smustudent1@yahoo.com> writes:

> --- Jay Belanger <belanger@truman.edu> wrote:
>> 
>> Andrei Zorine <zoav1@uic.nnov.ru> writes:
>> 
>> > Hello,
>> > I just thought about asking for a small May Day gift from you guys
>> > :) I can't make my XEmacs *maxima* buffer display different fonts.
>> > (Your gift is a good advice, of course). Here's the part of my 
>> > init.el file
>> > ...
>> > So when I run font-lock-mode only strings get displayed in green,
>> > no boldface etc :(
>
>> Hmm.  The mode in the *maxima* buffer is a derived mode from
>> comint-mode, and comint-mode does all the font-locking.  So I'm not
>> sure why nothing is happening, perhaps the XEmacs comint-mode doesn't
>> do any coloring?  I don't know, I'll look into it.

Hm.  The XEmacs version of comint-mode seems to have all the face and
font-locking commented out; I'm not sure why.  There are many
comments of the form "Disable for now, I'm not sure that font-lock
doesn't do better."

> I don't know if this is related or not, but for a while now I haven't
> been able to get colors when I run a maxima session like I used to be
> able to.  The screenshot in the Maxima Book is what it used to look
> like, and the one in the screenshots page is what I've got now.  Am I
> missing an option or has something changed?  

Something changed.  I seem to recall someone complaining about the
coloring the the Maxima buffer (there's a phrase for it, which I
can't recall.  Technicolor spaghetti?)
(Note that I "seem" to recall.  It might have been the voices in my
head.) 
Since comint-mode does it's own font-locking (and does it similar to
TeXmacs, input one face, output another), and since I think that if
Emacs already takes care of something, it probably shouldn't be
overridden, I had comint-mode take care of the font-locking for the
Maxima session.
Anyhow, I'll add the option of letting comint-mode do the
font-locking, or getting all the colors and using essentially the same
font-locking as maxima-mode.  Hopefully, that will take care of the
XEmacs problem, also.

Jay