help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Font-lock in a comint derived mode


From: Ian Zimmerman
Subject: Re: Font-lock in a comint derived mode
Date: Thu, 6 Aug 2015 08:03:24 -0700
User-agent: Mutt/1.5.21 (2010-09-15)

On 2015-08-06 11:48 +0200, Björn Lindqvist wrote:

> Why doesn't regular font-locking "just work"?

WDYM by "regular" font-locking?  font-lock depends on the major mode to
provide the syntactic patterns to highlight.  In your case, I'm guessing
that the major mode is Python mode, and that it is applied not only to
bona fide Python code but also to the inferior Python interaction
buffer.  That is a mistake, IMO.  (I don't know if that is done by the
Emacs module or by you.)  If highlighting is desired in the interaction
buffer, it should have its own more conservative rules, which can take
into account restrictions such a you suggested:

> then font-lock thinks there is an unterminated string and everything
> will be font-locked in the string face. Maybe there is a way to stop
> font-lock from "running through" the interpreter prompts?

-- 
Please *no* private copies of mailing list or newsgroup messages.
Rule 420: All persons more than eight miles high to leave the court.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]