From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: lee Newsgroups: gmane.emacs.help Subject: Re: syntax highlighting on the fly Date: Fri, 07 Mar 2014 14:17:58 +0100 Organization: my virtual residence Message-ID: <8761nqkv09.fsf@yun.yagibdah.de> References: <87zjl2kzdv.fsf@yun.yagibdah.de> <87zjl2i4jo.fsf@gmail.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 1394198976 30537 80.91.229.3 (7 Mar 2014 13:29:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Mar 2014 13:29:36 +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 14:29:42 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 1WLuqM-0007ov-BN for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Mar 2014 14:29:42 +0100 Original-Received: from localhost ([::1]:36527 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLuqL-0000Ya-Sl for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Mar 2014 08:29:41 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50710) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLuq7-0000Wx-Cm for help-gnu-emacs@gnu.org; Fri, 07 Mar 2014 08:29:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WLuq2-0000Br-Dg for help-gnu-emacs@gnu.org; Fri, 07 Mar 2014 08:29:27 -0500 Original-Received: from client-194-42-186-216.muenet.net ([194.42.186.216]:44525 helo=yun.yagibdah.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLuq2-0000BT-5o for help-gnu-emacs@gnu.org; Fri, 07 Mar 2014 08:29:22 -0500 Original-Received: from lee by yun.yagibdah.de with local (Exim 4.80.1) (envelope-from ) id 1WLupz-0007bV-LO for help-gnu-emacs@gnu.org; Fri, 07 Mar 2014 14:29:19 +0100 In-Reply-To: <87zjl2i4jo.fsf@gmail.com> (Jambunathan K.'s message of "Fri, 07 Mar 2014 17:50:11 +0530") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Mail-Followup-To: help-gnu-emacs@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 194.42.186.216 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:96293 Archived-At: Jambunathan K writes: > (info "(emacs) Font Lock") > > (info "(emacs) Highlight Interactively") > > Put your cursor after the closing ")" and do C-x C-e. Hint: Search for > FIXME in the first node. > > 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 >> >> >> (since you=C2=B4re using #define anyway) and have all occurances of "foo= bar" >> 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? Thank you for the pointers! Highlighting interactively (with hi-lock-mode) is exactly what I=C2=B4m looking for :) --=20 Knowledge is volatile and fluid. Software is power.