From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jfjfcli@gmail.com Newsgroups: gmane.emacs.help Subject: case-insensitive regexp in derived-mode Date: Sun, 27 Apr 2014 16:14:26 -0700 (PDT) Message-ID: <4d9cd74d-624c-479d-a166-b995079f563e@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1398643049 24195 80.91.229.3 (27 Apr 2014 23:57:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 27 Apr 2014 23:57:29 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 28 01:57:24 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WeYwj-0003ro-N8 for geh-help-gnu-emacs@m.gmane.org; Mon, 28 Apr 2014 01:57:21 +0200 Original-Received: from localhost ([::1]:40932 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WeYwj-0007la-E9 for geh-help-gnu-emacs@m.gmane.org; Sun, 27 Apr 2014 19:57:21 -0400 X-Received: by 10.182.158.135 with SMTP id wu7mr11483472obb.19.1398640467473; Sun, 27 Apr 2014 16:14:27 -0700 (PDT) X-Received: by 10.182.119.129 with SMTP id ku1mr147890obb.2.1398640467262; Sun, 27 Apr 2014 16:14:27 -0700 (PDT) Original-Path: usenet.stanford.edu!l13no11513327iga.0!news-out.google.com!gi6ni634igc.0!nntp.google.com!c1no4665902igq.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=72.53.97.26; posting-account=KUXtvgoAAAArlkzXrM5N-YUtChVGOm8i Original-NNTP-Posting-Host: 72.53.97.26 User-Agent: G2/1.0 Injection-Date: Sun, 27 Apr 2014 23:14:27 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:205134 X-Mailman-Approved-At: Sun, 27 Apr 2014 19:56:56 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:97402 Archived-At: Following this tutorial http://ergoemacs.org/emacs/elisp_syntax_coloring.html Now my keywords are working, but the regexp to colour keyword is case insensitive. I was able to get it to work by evaluating (setq font-lock-keywords-case-fold-search t) after loading the custom mode into that buffer. However no matter where I put it in the .el file of the custom mode, I cannot to work automatically. The documentation also says "You can use case-fold in font-lock-defaults to specify the value of font-lock-keywords-case-fold-search which says whether search-based fontification should be case-insensitive." any help would be great, thanks.