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: Wed, 22 Dec 2004 19:18:34 -0500 Message-ID: <1dSdnQiE5LRBk1fcRVn-rg@comcast.com> 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 1103761183 22054 80.91.229.6 (23 Dec 2004 00:19:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 23 Dec 2004 00:19:43 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 23 01:19:36 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 1ChGhc-0008A6-00 for ; Thu, 23 Dec 2004 01:19:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1ChGsB-0002Va-0D for geh-help-gnu-emacs@m.gmane.org; Wed, 22 Dec 2004 19:30:31 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.cwix.com!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: Wed, 22 Dec 2004 18:18:36 -0600 Original-Newsgroups: gnu.emacs.help Original-Lines: 32 Original-NNTP-Posting-Host: 68.58.174.170 Original-X-Trace: sv3-clYFapdDkLHSrsdg0iBnaTaPahPGF7DiE+XpQyyqkn9TeGAZMXjASg4FoAiIgExyafCCjhzNjG8rW2e!LtkPwkfm0dQZ9jZxtPQ66UsOJ0Qyo1ME5CLoiunXw15rjmsKQr4bILksbXXuYg== 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:127484 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:22938 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:22938 Peter Lee finally wrote on Wed December 22 2004 04:55 pm: >>>>> jab3 writes: > > jab3> Ah. That seems to be doing what I want. What if I just put the > commands in > jab3> my .emacs file? How would I type the command for that file? > > jab3> (highlight-regexp "\%s" 'font-lock-function-name-face) ??? > > maybe something like: > > (global-set-key (kbd "C-c m") (lambda () (interactive) (highlight-regexp > "\%s" "hi-yellow"))) Excellent. I got that to work with font-lock-function-name-face, so everything's all starting to come together. I have a question though. I had to do something odd (at least I consider it odd :); to make '\n' work in the .emacs file with the lambda function, I had to use 4 \ for it to only use the '\n'. That is, (highlight-regexp "\\\\n" "font-lock-function-name-face") is the only thing that worked correctly. If I only did "\\n" then Emacs highlighted all 'n's. Why is it necessary to use '\\\\n' to represent '\n'? I can understand '\\n' - it's just the double that is confusing me. :) Thanks for all your help, jab3