From: Ian Zimmerman <itz@buug.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Font-lock in a comint derived mode
Date: Thu, 6 Aug 2015 08:03:24 -0700 [thread overview]
Message-ID: <20150806145432.28170.1EC3F602@ahiker.mooo.com> (raw)
In-Reply-To: <CALG+76c84T4X0cHt+Pm9sKiqtVD6SZPjcBSvLc97G6A3P0hq+g@mail.gmail.com>
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.
next prev parent reply other threads:[~2015-08-06 15:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-06 9:48 Font-lock in a comint derived mode Björn Lindqvist
2015-08-06 15:03 ` Ian Zimmerman [this message]
2015-08-07 14:43 ` Björn Lindqvist
2015-08-07 16:37 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150806145432.28170.1EC3F602@ahiker.mooo.com \
--to=itz@buug.org \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).