From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rainer M Krug Newsgroups: gmane.emacs.help Subject: Re: syntax highlighting on the fly Date: Fri, 07 Mar 2014 13:24:12 +0100 Message-ID: References: <87zjl2kzdv.fsf@yun.yagibdah.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1394195090 16686 80.91.229.3 (7 Mar 2014 12:24:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Mar 2014 12:24:50 +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 Mar 07 13:24:58 2014 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 1WLtpi-0002mg-QA for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Mar 2014 13:24:58 +0100 Original-Received: from localhost ([::1]:36004 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLtpi-0007nq-AR for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Mar 2014 07:24:58 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36643) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLtpM-0007kf-KY for help-gnu-emacs@gnu.org; Fri, 07 Mar 2014 07:24:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WLtpC-0003an-JC for help-gnu-emacs@gnu.org; Fri, 07 Mar 2014 07:24:36 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:36672) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLtpC-0003ai-CQ for help-gnu-emacs@gnu.org; Fri, 07 Mar 2014 07:24:26 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WLtp8-0002EN-Gs for help-gnu-emacs@gnu.org; Fri, 07 Mar 2014 13:24:22 +0100 Original-Received: from arn78-1-88-186-171-7.fbx.proxad.net ([88.186.171.7]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 Mar 2014 13:24:22 +0100 Original-Received: from Rainer by arn78-1-88-186-171-7.fbx.proxad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 Mar 2014 13:24:22 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 67 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: arn78-1-88-186-171-7.fbx.proxad.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:9Vjb34O5qqFaN4lSkPx0zUVqBWs= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:96292 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable lee writes: > Hi, > > is something available with emacs to do to syntax highlighting on the > fly? > > "On the fly" means: You have a mode with syntax highlighting which does > most of the highlighting. Now you work on a file (source code for some > program) in a buffer with your mode enabled, and you decide that for > this particular file, you want "foobar" to be highlighted. > > You=C2=B4d have to somehow tell emacs to do this, for example by adding a > comment like > > > // highlight: foobar > > > to your file. You could also do it like > > > #define foobar 25 I like this idea - add highlighting of certain words by using file-local-variables. Please keep us posted. Rainer > > > (since you=C2=B4re using #define anyway) and have all occurances of "foob= ar" > highlighted. > > It=C2=B4s probably possible to write something for this, and I wouldn=C2= =B4t even > know where to start. Perhaps it=C2=B4s already built in and I only don= =C2=B4t > know about it? =2D-=20 Rainer M. Krug email: RMKruggmailcom --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iQEcBAEBAgAGBQJTGbpwAAoJENvXNx4PUvmCsy0H/AlKUdZI7usNXFlMTOPoIuIw DhvlnOOBr46QQBB9q1H3GS7U7wp8gOGYl5CUq/dPkDggXvbNoSwFo6growyyDoO/ PYrSniw3JBt16cSWurLB9+7AxIK1KFwPG1TIGoQZV/ZLWUCPI+LV5f7fd+DWpc1i asVJgK0CZPU8dsPE1SRs5olMnsqJZjTirb6kQP/SAy1+7319LxdUUi54B4YpdVUD kYjHEbhQXF5cLzB80xmT9WC2qsrVISdXIKE75KQOFzIFC7DidzhtQUgPYqKkB1WR iErSe6LTpZmlMtf1jh1+JFqXXEA6L/kYkw0OmU+N4QslmQNsS/3qxuthjwpwWc4= =zOK+ -----END PGP SIGNATURE----- --=-=-=--