From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Bj=C3=B6rn_Lindqvist?= Newsgroups: gmane.emacs.help Subject: Re: Font-lock in a comint derived mode Date: Fri, 7 Aug 2015 16:43:03 +0200 Message-ID: References: <20150806145432.28170.1EC3F602@ahiker.mooo.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1438958604 8977 80.91.229.3 (7 Aug 2015 14:43:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Aug 2015 14:43:24 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 07 16:43:24 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZNirj-00059b-3h for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Aug 2015 16:43:23 +0200 Original-Received: from localhost ([::1]:49438 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNiri-0000f4-G7 for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Aug 2015 10:43:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45156) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNirX-0000ey-NB for help-gnu-emacs@gnu.org; Fri, 07 Aug 2015 10:43:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZNirQ-0002lT-Qs for help-gnu-emacs@gnu.org; Fri, 07 Aug 2015 10:43:11 -0400 Original-Received: from mail-wi0-x22b.google.com ([2a00:1450:400c:c05::22b]:37895) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNirQ-0002kW-Iu for help-gnu-emacs@gnu.org; Fri, 07 Aug 2015 10:43:04 -0400 Original-Received: by wibxm9 with SMTP id xm9so68772519wib.1 for ; Fri, 07 Aug 2015 07:43:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=othGauVl0is+o3MtLBc8XixKAESetVuhr2ejcEmGbSU=; b=yXEyQbfx9UYHChbZLWQR6SVbn92c/0KkZRsQaI1xXgBgHQfhnBWsbxu/gMZqIJKfBD CNQpB663O7VyB1BQnhkJxT/0wU8pslNjhoy9UmHHYvuIN/0U3RgyqhPqzkdxGWm663nB DQqfCW7LyRdiDN6imoRAp1eWNrDJnznAV1OoXAyiZe5rHeJbg47/eBOvpyscjVhZQOGU +0OwsAst3hwsiJh9abD3tSrNsPevI1CI0kSEEql0KqmKdmxoMtUWaQP9UPcAadreOEpd MDXANRFONa0lnAUNvJcckx4UPYxGaWdZtnZcEBTPeUaI5crRZ1CX2zpBT2w0DEP378VL WlrQ== X-Received: by 10.180.75.100 with SMTP id b4mr7956757wiw.74.1438958583287; Fri, 07 Aug 2015 07:43:03 -0700 (PDT) Original-Received: by 10.194.75.9 with HTTP; Fri, 7 Aug 2015 07:43:03 -0700 (PDT) In-Reply-To: <20150806145432.28170.1EC3F602@ahiker.mooo.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::22b X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:106318 Archived-At: 2015-08-06 17:03 GMT+02:00 Ian Zimmerman : > On 2015-08-06 11:48 +0200, Bj=C3=B6rn Lindqvist wrote: > >> Why doesn't regular font-locking "just work"? > > 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: Correct. I tried to explain why regular font-locking doesn't "just work" and you need a more conservative approach. But it's not easy to come up with an approach that is conservative enough not to have highlighting leaking due to unterminated strings and similar problems, and radical enough to font-lock normal strings. It's hard and a lot of work which is why I'm looking for prior art in this area. Almost anyone who has written a comint-mode must have considered the same problem I'm describing. --=20 mvh/best regards Bj=C3=B6rn Lindqvist