unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: jab3 <manual@helpdesk.org>
Subject: Re: Syntax Highlighting Latency in Emacs
Date: Wed, 22 Dec 2004 19:18:34 -0500	[thread overview]
Message-ID: <1dSdnQiE5LRBk1fcRVn-rg@comcast.com> (raw)
In-Reply-To: u1xdidm0a.fsf@gmail.com

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

  reply	other threads:[~2004-12-23  0:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-12  1:42 Syntax Highlighting Latency in Emacs jab3
2004-12-12 13:13 ` Thien-Thi Nguyen
2004-12-12 13:22 ` Peter Dyballa
     [not found] ` <mailman.5367.1102858474.27204.help-gnu-emacs@gnu.org>
2004-12-12 22:23   ` jab3
2004-12-21 18:38     ` Peter Lee
2004-12-21 20:03       ` jab3
2004-12-22 21:55         ` Peter Lee
2004-12-23  0:18           ` jab3 [this message]
2004-12-27 17:09             ` Kevin Rodgers
2004-12-13  9:35 ` Pierre-Charles David
2004-12-13 12:08 ` Kai Grossjohann
     [not found] ` <mailman.5589.1102940728.27204.help-gnu-emacs@gnu.org>
2004-12-13 23:42   ` Stefan Monnier
2004-12-21 20:04 ` jab3

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1dSdnQiE5LRBk1fcRVn-rg@comcast.com \
    --to=manual@helpdesk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).