From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Is there a "selective setq locator/highlighter" anywhere? Date: Fri, 23 Jan 2009 15:41:51 +0000 Message-ID: <20090123154150.GD3056@muc.de> References: <20090122135425.GA3719@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1232724293 3540 80.91.229.12 (23 Jan 2009 15:24:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Jan 2009 15:24:53 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lennart Borgman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 23 16:26:06 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 1LQNts-00060h-7F for ged-emacs-devel@m.gmane.org; Fri, 23 Jan 2009 16:24:52 +0100 Original-Received: from localhost ([127.0.0.1]:37142 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LQNsa-0005I2-I8 for ged-emacs-devel@m.gmane.org; Fri, 23 Jan 2009 10:23:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LQNsU-0005FA-Iu for emacs-devel@gnu.org; Fri, 23 Jan 2009 10:23:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LQNsS-0005AN-Mm for emacs-devel@gnu.org; Fri, 23 Jan 2009 10:23:26 -0500 Original-Received: from [199.232.76.173] (port=52552 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LQNsS-00059q-Ah for emacs-devel@gnu.org; Fri, 23 Jan 2009 10:23:24 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:3186 helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LQNsR-0000vi-TY for emacs-devel@gnu.org; Fri, 23 Jan 2009 10:23:24 -0500 Original-Received: (qmail 21665 invoked by uid 3782); 23 Jan 2009 15:23:16 -0000 Original-Received: from acm.muc.de (pD9E51D5E.dip.t-dialin.net [217.229.29.94]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Fri, 23 Jan 2009 16:23:13 +0100 Original-Received: (qmail 7933 invoked by uid 1000); 23 Jan 2009 15:41:51 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.6-4.9 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:108149 Archived-At: On Thu, Jan 22, 2009 at 02:44:11PM +0100, Lennart Borgman wrote: > On Thu, Jan 22, 2009 at 2:54 PM, Alan Mackenzie wrote: > > Hi, Emacs! [ .... ] > > I would like a tool which would highlight these: > > (setq foo bar > > c-state-cache (cdr c-state-cache)) > > (setcar c-state-cache (caar c-state-cache)) > Can't you catch this with a regexp? (And I never understood what the > multi setq is good for.) A regexp will only work in practice, sort of, not in theory. In particular, regexps (which are mathematically equivalent to finite state machines) can't parse arbitrarily nested structures (for which one needs a push-down automaton or suchlike. > > . Does anybody know of anything like this in existance? Anyhow, I've thrown together a requisite piece of software. See another post. -- Alan Mackenzie (Nuremberg, Germany).