unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "seberino@spawar.navy.mil" <seberino@spawar.navy.mil>
To: help-gnu-emacs@gnu.org
Subject: How add Font Lock keywords & not clash with other modes?
Date: Thu, 18 Dec 2008 15:23:32 -0800 (PST)	[thread overview]
Message-ID: <652b9f84-ce52-4db5-ab53-6d21a3932127@p2g2000prn.googlegroups.com> (raw)

I wrote a very simple mode that simply adds one keyword of 2 regexs to
the Font Lock mode keywords list...

(("\t+"                    0 'highlight)      ; Highlight
TABs.
 ("^.\\{79\\}\\(.*\\)" 1 'highlight))    ; Highlight chars beyond
column 79

I noticed it doesn't work right in HTML mode.

Is there a way to add custom keywords so that they don't clash with
language modes?

(I saw some code where they added their keywords to the *end* of the
keywords list.  Is that the answer?)

Chris


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

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=652b9f84-ce52-4db5-ab53-6d21a3932127@p2g2000prn.googlegroups.com \
    --to=seberino@spawar.navy.mil \
    --cc=help-gnu-emacs@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.
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).