From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joe Bloggs Newsgroups: gmane.emacs.help Subject: case-insensitive regexp for fontlock specification Date: Tue, 12 Aug 2008 11:42:29 +0100 Message-ID: <87vdy6wm3u.fsf@DEBLAP1.BeNet> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1218541954 15922 80.91.229.12 (12 Aug 2008 11:52:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 Aug 2008 11:52:34 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 12 13:53:26 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KSsRE-0007xJ-Td for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Aug 2008 13:53:21 +0200 Original-Received: from localhost ([127.0.0.1]:43379 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KSsQI-0001N9-PB for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Aug 2008 07:52:22 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news2.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Tue, 12 Aug 2008 05:42:30 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:rCiwdiQ6OXy9Js+hn0jKKNjjtJk= Original-Lines: 23 X-Usenet-Provider: http://www.giganews.com Original-X-Trace: sv3-DdXciJ0tVAGgD8DmIOGnNLrHQjPPV4NXMj88KSp0cy4yJG0z0S0t3JOcSNSTnewgmi+Ig3eds/xIlJB!d+x7I0vu+T4TDuFjgsVtFN/zwgi0clcrlLySbGKwK0BNt4hfmS3F Original-X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html 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.39 Original-Xref: news.stanford.edu gnu.emacs.help:161159 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: news.gmane.org gmane.emacs.help:56504 Archived-At: 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?