From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.devel Subject: Re: "Font-lock is limited to text matching" is a myth Date: Mon, 10 Aug 2009 22:42:52 +0200 Message-ID: <87my67s8mr.fsf@randomsample.de> References: <7b501d5c0908091634ndfba631vd9db6502db301097@mail.gmail.com> <200908101335.24002.danc@merrillprint.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1249959626 16057 80.91.229.12 (11 Aug 2009 03:00:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Aug 2009 03:00:26 +0000 (UTC) Cc: Daniel Colascione , Daniel Colascione , emacs-devel@gnu.org, Deniz Dogan , Stefan Monnier , "Eric M. Ludlam" , Steve Yegge , Leo , Miles Bader To: Lennart Borgman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 11 05:00:17 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mahaz-0004g4-GQ for ged-emacs-devel@m.gmane.org; Tue, 11 Aug 2009 05:00:17 +0200 Original-Received: from localhost ([127.0.0.1]:55506 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mahay-0006Kf-Fv for ged-emacs-devel@m.gmane.org; Mon, 10 Aug 2009 23:00:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mabhw-0001UN-KX for emacs-devel@gnu.org; Mon, 10 Aug 2009 16:43:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mabhv-0001TX-KP for emacs-devel@gnu.org; Mon, 10 Aug 2009 16:43:04 -0400 Original-Received: from [199.232.76.173] (port=44249 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mabhv-0001TE-BE for emacs-devel@gnu.org; Mon, 10 Aug 2009 16:43:03 -0400 Original-Received: from m61s02.vlinux.de ([83.151.21.164]:40996) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mabhr-0001eM-49; Mon, 10 Aug 2009 16:42:59 -0400 Original-Received: from dslc-082-082-178-179.pools.arcor-ip.net ([82.82.178.179] helo=void) by m61s02.vlinux.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1Mabhm-0007Pj-AD; Mon, 10 Aug 2009 22:42:54 +0200 In-Reply-To: (Lennart Borgman's message of "Mon, 10 Aug 2009 20:04:56 +0200") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Mon, 10 Aug 2009 22:59:29 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:114016 Archived-At: [Added Eric Ludlam to Cc] Lennart Borgman writes: > 2009/8/10 Daniel Colascione : >> It already does. It's called font-lock. If you want some kind of >> infrastructure that uses a grammar to perform fontification, I >> believe CEDET, which will be included in Emacs, can be wired up that >> way [I think? I'm not quite sure whether Semantic's tags are generic >> enough for fontification]. > > > I think Xah meant the grammars. Maybe CEDET is not yet using > font-lock, I do not know how old JIT-lock, which is an essential part > for this, is. CEDET can create formatted strings from the tags, and it supports using font-lock for that (see file semantic-format.el). There's also the minor-mode 'semantic-decoration' (semantic-decorate.el) which applies styles to certain tags in the buffer while editing, and this mode does not use font-lock. Since Semantic usually does not parse every expression in the buffer, this decoration is currently limited to stuff like include statements, function declarations or protected class members. (Eric, please correct me if I'm wrong here). -David