[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What is this syntax for in php-mode.el
From: |
Robert D. Crawford |
Subject: |
Re: What is this syntax for in php-mode.el |
Date: |
Fri, 20 Apr 2007 08:08:21 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.98 (gnu/linux) |
"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
> Thanks Ted. Now I only wonder about that strange
> font-lock-syntactic-keywords spec that I can not find in the Emacs
> lisp manual.
This might help, fetched with apropos:
font-lock-syntactic-keywords is a variable defined in `font-lock.el'.
Its value is nil
Documentation:
A list of the syntactic keywords to put syntax properties on.
The value can be the list itself, or the name of a function or variable
whose value is the list.
See `font-lock-keywords' for a description of the form of this list;
only the differences are stated here. MATCH-HIGHLIGHT should be of the form:
(SUBEXP SYNTAX OVERRIDE LAXMATCH)
where SYNTAX can be a string (as taken by `modify-syntax-entry'), a syntax
table, a cons cell (as returned by `string-to-syntax') or an expression whose
value is such a form. OVERRIDE cannot be `prepend' or `append'.
Here are two examples of elements of `font-lock-syntactic-keywords'
and what they do:
("\\$\\(#\\)" 1 ".")
gives a hash character punctuation syntax (".") when following a
dollar-sign character. Hash characters in other contexts will still
follow whatever the syntax table says about the hash character.
("\\('\\).\\('\\)"
(1 "\"")
(2 "\""))
gives a pair single-quotes, which surround a single character, a SYNTAX of
"\"" (meaning string quote syntax). Single-quote characters in other
contexts will not be affected.
This is normally set via `font-lock-defaults'.
--
Robert D. Crawford rdc1x@comcast.net
This fortune was brought to you by the people at Hewlett-Packard.