help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with font-lock / syntax-propertize-function


From: John Mastro
Subject: Re: Help with font-lock / syntax-propertize-function
Date: Sat, 20 Dec 2014 11:34:11 -0800

Hi Stefan,

Stefan Monnier <monnier@iro.umontreal.ca> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]