From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Mastro Newsgroups: gmane.emacs.help Subject: Re: Help with font-lock / syntax-propertize-function Date: Sat, 20 Dec 2014 11:34:11 -0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1419104093 23781 80.91.229.3 (20 Dec 2014 19:34:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Dec 2014 19:34:53 +0000 (UTC) To: "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Dec 20 20:34:46 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 1Y2Pna-0000Nq-2J for geh-help-gnu-emacs@m.gmane.org; Sat, 20 Dec 2014 20:34:46 +0100 Original-Received: from localhost ([::1]:35618 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2PnZ-00043U-BA for geh-help-gnu-emacs@m.gmane.org; Sat, 20 Dec 2014 14:34:45 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2PnN-00043D-Kp for help-gnu-emacs@gnu.org; Sat, 20 Dec 2014 14:34:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y2PnM-0006MO-Jd for help-gnu-emacs@gnu.org; Sat, 20 Dec 2014 14:34:33 -0500 Original-Received: from mail-ob0-x22b.google.com ([2607:f8b0:4003:c01::22b]:57176) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2PnM-0006LG-EV for help-gnu-emacs@gnu.org; Sat, 20 Dec 2014 14:34:32 -0500 Original-Received: by mail-ob0-f171.google.com with SMTP id uz6so16807622obc.2 for ; Sat, 20 Dec 2014 11:34:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=zH4FX/F2fwZZtD1zU1stmvW3y2AwhlWiPQYVD7Jwnv8=; b=EOy18eOFc003O3wlMbuyuwdHmzDoLk+nF4N33AX6MHZ0R0SgWrooF8DkOSwCvns9ST 1wfZ9x3BMyni5I7epIiSKLQG+DxlakgkQ7TIf3K+fLMefh2q2FiAyPGLTumoqY6MuQop obbjKfrYHjkU9O8nAbP6yi4q18TAPSvgykDuWBlUat0mF+pAIYprFob927LZw82OvWpp Eg0MkAy1XOqEkxx5cBGuZtZ6SW9xyFlnyuofF6e57TDB6i/BeoE11gArDuhOVIHSiYBr Fki/weZMfonqOLvtOOUkc5EkP96nDf1o3Y8x0hLHasNZ+BTVOL8GgDM/9+M6wAFZbquG qVug== X-Received: by 10.202.84.147 with SMTP id i141mr8085157oib.56.1419104071729; Sat, 20 Dec 2014 11:34:31 -0800 (PST) Original-Received: by 10.76.12.162 with HTTP; Sat, 20 Dec 2014 11:34:11 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::22b 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:101695 Archived-At: Hi Stefan, Stefan Monnier wrote: > I think the simplest way to do that is, oddly enough to set the > syntax-table to have the " character be given the " syntax (so that > "..." is then fontified by font-lock with the font-lock-string-face), > and then to customize your font-lock-string-face to look very much like > the default face. Thanks for the reply. I tried that but it didn't seem to affect fontification. If I run (modify-syntax-entry ?\" "\"") in a SQL mode buffer, commands like `kill-sexp' will then work on these column names (which was another of my goals), but fontification is unaffected (even after M-x font-lock-fontify-buffer). Am I modifying the syntax table incorrectly? By the way, my ideal solution would continue to highlight "real" strings (those in single quotes) as strings, and only prevent highlighting of column names (double quoted strings). So if you have any other thoughts on how to accomplish that, it would be much appreciated. -- john