From: Joe Bloggs <who@cares.invalid>
To: help-gnu-emacs@gnu.org
Subject: case-insensitive regexp for fontlock specification
Date: Tue, 12 Aug 2008 11:42:29 +0100 [thread overview]
Message-ID: <87vdy6wm3u.fsf@DEBLAP1.BeNet> (raw)
Hi, I am writing a major mode for editing SPSS files.
I am following the tutorial on this webpage:
http://renormalist.net/cgi-bin/twiki/view/Renormalist/EmacsLanguageModeCreationTutorial
The keyword matching for font-lock should be case-insensitive.
Is there an easy way to specify this?
At the moment I have the following (abbreviated):
(defconst spss-font-lock-keywords-1
(list
'("\\<\\(if\\|followed\\|by\\|some\\|other\\|keywords\\)\\>" . font-lock-keyword-face)
"Minimal highlighting expressions for spss mode.")
which only matches lower case. I could change it like this for example:
(defconst spss-font-lock-keywords-1
(list
'("\\<\\([iI][fF]\\|followed\\|by\\|some\\|other\\|keywords\\)\\>" . font-lock-keyword-face)
"Minimal highlighting expressions for spss mode.")
to make it match if, If, iF & IF, but to make that change for every keyword would take ages.
Is there a simpler way?
next reply other threads:[~2008-08-12 10:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-12 10:42 Joe Bloggs [this message]
2008-08-13 1:51 ` case-insensitive regexp for fontlock specification Kevin Rodgers
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vdy6wm3u.fsf@DEBLAP1.BeNet \
--to=who@cares.invalid \
--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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.