From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: jab3 Newsgroups: gmane.emacs.help Subject: Re: Syntax Highlighting Latency in Emacs Date: Tue, 21 Dec 2004 15:03:02 -0500 Message-ID: References: <9badnW_9ItZTWSHcRVn-iw@comcast.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: sea.gmane.org 1103659510 19639 80.91.229.6 (21 Dec 2004 20:05:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 21 Dec 2004 20:05:10 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 21 21:05:04 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CgqFj-000388-00 for ; Tue, 21 Dec 2004 21:05:04 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CgqQF-0002Xz-L7 for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Dec 2004 15:15:55 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Tue, 21 Dec 2004 14:03:05 -0600 Original-Newsgroups: gnu.emacs.help Original-Lines: 33 Original-NNTP-Posting-Host: 68.58.174.170 Original-X-Trace: sv3-EJtexWCJqQt/l8fNz2zw9SRhjJ7ViUDl2iAU+LxB6wlfH2FL+t9HfIYucKzi5S5loa2nZmW7ruwHPwb!vcV4urZkMnBRQVaV6R70LHWxegd9S167+G9src1JEPtfOpxIbiKuPry5S34Q9w== Original-X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.22 Original-Xref: shelby.stanford.edu gnu.emacs.help:127455 Original-To: help-gnu-emacs@gnu.org 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: main.gmane.org gmane.emacs.help:22904 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:22904 Peter Lee finally wrote on Tue December 21 2004 01:38 pm: >>>>> jab3 writes: > > jab3> I'm also interested in figuring out (maybe > jab3> with regular expressions) a way to make Emacs emulate another > vim feature jab3> that I do like: highlighting control characters in > quoted strings in a C > jab3> file. For instance, in printf("Hello %s\n", name); I would like > the %s and jab3> \n highlighted in a different color from the normal > string quote color. > > Do you mean like > M-x highlight-regexp [ret] \%s > M-x highlight-regexp [ret] \\n > > C-x w h > > Or do you mean something more permanent? You could probably use > highlight-regexp in conjunction with one of the font-lock > callbacks... But there's probably a better way. Ah. That seems to be doing what I want. What if I just put the commands in my .emacs file? How would I type the command for that file? (highlight-regexp "\%s" 'font-lock-function-name-face) ??? I know that's probably not right, but would something like that work? Thanks, jab3