From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jacob Gerlach Newsgroups: gmane.emacs.help Subject: Re: Selective Font Lock Case Sensitivity Date: Wed, 16 Apr 2014 11:41:19 -0700 (PDT) Message-ID: References: <784cf2dd-38c6-4505-841c-a88e112f4759@googlegroups.com> <34c78649-842c-4ddc-ada5-8ffafe5c296d@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 1397673927 32468 80.91.229.3 (16 Apr 2014 18:45:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Apr 2014 18:45:27 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 16 20:45:20 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 1WaUpi-0003ku-1C for geh-help-gnu-emacs@m.gmane.org; Wed, 16 Apr 2014 20:45:18 +0200 Original-Received: from localhost ([::1]:56205 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WaUph-0007iB-LJ for geh-help-gnu-emacs@m.gmane.org; Wed, 16 Apr 2014 14:45:17 -0400 X-Received: by 10.236.137.50 with SMTP id x38mr4656727yhi.9.1397673679712; Wed, 16 Apr 2014 11:41:19 -0700 (PDT) X-Received: by 10.140.93.103 with SMTP id c94mr237902qge.4.1397673679682; Wed, 16 Apr 2014 11:41:19 -0700 (PDT) Original-Path: usenet.stanford.edu!m5no2549565qaj.1!news-out.google.com!du2ni10549qab.0!nntp.google.com!cm18no3541274qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=18.189.8.228; posting-account=Hx-_8AoAAACyMXgs4MCS3wNERNLct_lk Original-NNTP-Posting-Host: 18.189.8.228 User-Agent: G2/1.0 Injection-Date: Wed, 16 Apr 2014 18:41:19 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:204893 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:97158 Archived-At: I'm having trouble implementing this, I think because of some more basic lisp understanding deficiency. I'm constructing entries for my-font-lock-keywords by using mapc to work from a master list. The function called by mapc adds a backquoted list to my keyword list. Before trying to adjust case sensitivity, it looked like: (defun add-to-my-keyword-list (input) (add-to-list 'my-font-lock-keywords `( ,(;;non-buggy-code here for anchor) ,(regexp-opt (cadr input)) (my-pre-form) nil (0 font-lock-keyword-face)))) My trouble is getting (regexp-opt (cadr input)) to properly expand to an argument for re-search-forward. The closest I've been able to come is to use (lambda (limit) (let ((case-fold-search t)) `(re-search-forward ,(regexp-opt ,@(cadr input)) limit t))) In this case, (cadr input) is evaluated, but (regexp-opt is not. The constructed list reads ... (\` (re-search-forward (\,@ (regexp-opt ... Is this an easy fix?