From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dieter Wilhelm Newsgroups: gmane.emacs.help Subject: Re: fontifying of user defined variables Date: Wed, 13 Sep 2006 23:54:50 +0200 Organization: The Church of Emacs Message-ID: <87bqpjo2j9.fsf@hans.local.net> References: <10129949.484411158055226421.JavaMail.servlet@kundenserver> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1158195742 22051 80.91.229.2 (14 Sep 2006 01:02:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 14 Sep 2006 01:02:22 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 14 03:02:20 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GNfcJ-00044n-Kk for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Sep 2006 03:02:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GNfcJ-0002SK-90 for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Sep 2006 21:02:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GNfc8-0002SF-Io for help-gnu-emacs@gnu.org; Wed, 13 Sep 2006 21:02:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GNfc6-0002S3-NX for help-gnu-emacs@gnu.org; Wed, 13 Sep 2006 21:01:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GNfc6-0002S0-Ig for help-gnu-emacs@gnu.org; Wed, 13 Sep 2006 21:01:58 -0400 Original-Received: from [212.227.126.186] (helo=moutng.kundenserver.de) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GNfdv-0002p2-Uh for help-gnu-emacs@gnu.org; Wed, 13 Sep 2006 21:03:52 -0400 Original-Received: from [84.167.66.53] (helo=duenenhof-wilhelm.de) by mrelayeu.kundenserver.de (node=mrelayeu0) with ESMTP (Nemesis), id 0MKwh2-1GNfc41tST-0003ma; Thu, 14 Sep 2006 03:01:56 +0200 Original-Received: by duenenhof-wilhelm.de (Postfix, from userid 1000) id A07D97584D; Wed, 13 Sep 2006 23:54:51 +0200 (CEST) Original-To: In-Reply-To: <10129949.484411158055226421.JavaMail.servlet@kundenserver> (dieter@duenenhof-wilhelm.de's message of "Tue\, 12 Sep 2006 12\:00\:28 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-Provags-ID: kundenserver.de abuse@kundenserver.de login:d7ab225b98a136e1c2910381f940ecb9 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:37357 Archived-At: dieter@duenenhof-wilhelm.de writes: > > I'd like to highlight user specified variables in a major mode for a > simple macro language (Ansys parametric design language or APDL). > All number variables are specified with the following assignment: > > VARIABEL=VALUE > > I'd like to fontify in a certain face any variable VARIABLE which > was defined in such a way and appears after the definition anywhere > in the code. Could you please outline the method or point to a lisp > file where such a "dynamic" highlighting is accomplished. Well, had a look at C/C++ mode and not even there I could find above functionality. So I guess it's too awkward to program this otherwise, I think, very helpful stuff. The only idea I've so far is for a function which parses now and then the buffer and adds or removes font lock keywords to the font-lock-keywords variable according to the current variable definitions in the buffer. Dieter -- Best wishes H. Dieter Wilhelm Darmstadt, Germany