unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Miles Bader <miles@lsi.nec.co.jp>
Subject: font-lock basics?
Date: Mon, 31 Jan 2005 13:03:38 +0900	[thread overview]
Message-ID: <buor7k2utwl.fsf@mctpc71.ucom.lsi.nec.co.jp> (raw)

Is there some trick to using font-lock?

I tried the simplest thing I could think of:

  (progn
    (font-lock-mode -1)
    (kill-all-local-variables)
    (font-lock-add-keywords nil '(("high" . font-lock-keyword-face)))
    (font-lock-mode t))

on the following text in a buffer:

   Oh how I love high society.

... and .... no highlighted keywords.

What's up?

Here's the resulting value of font-lock-keywords:

   font-lock-keywords's value is 
   (t
    (("high" . font-lock-keyword-face))
    ("high"
     (0 font-lock-keyword-face)))

   Local in buffer asdf; global value is nil

-Miles
-- 
.Numeric stability is probably not all that important when you're guessing.

             reply	other threads:[~2005-01-31  4:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-31  4:03 Miles Bader [this message]
2005-01-31 13:36 ` font-lock basics? Stefan Monnier
2005-01-31 15:43   ` Francis Litterio
2005-01-31 16:14     ` Francis Litterio
2005-01-31 16:29     ` Stefan Monnier
2005-01-31 17:31       ` Francis Litterio

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=buor7k2utwl.fsf@mctpc71.ucom.lsi.nec.co.jp \
    --to=miles@lsi.nec.co.jp \
    --cc=miles@gnu.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).