From 9d4a9520409fdb50987be6f4ca2c8afd5b53c994 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Mon, 10 Nov 2008 01:47:46 -0200 Subject: Don't highlight quotes in nested syntax tables for "auto" mode. To properly do it, it should also match the pattern for the macro name, to know if it is a plain text one or not, otherwise, it will get confused with usage of the characters (') and (`). --- lisp/modules/progmodes/auto.lsp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'lisp') diff --git a/lisp/modules/progmodes/auto.lsp b/lisp/modules/progmodes/auto.lsp index aa4543e..5c3eab0 100644 --- a/lisp/modules/progmodes/auto.lsp +++ b/lisp/modules/progmodes/auto.lsp @@ -85,19 +85,20 @@ ;; allow nesting (syntoken "[" :nospec t :property *prop-separator* :begin :quoted) (syntoken "]" :nospec t :property *prop-separator* :switch -1) - (synaugment :shared :variables)) + (synaugment :shared :comments :variables)) (syntoken ")" :nospec t :property *prop-macro* :switch -1) - (synaugment :shared :variables :comments)) + (synaugment :shared :quotes :variables :comments)) (syntable :shared nil nil (syntoken "[a-zA-Z0-9_]+\\(" :property *prop-macro* :begin :macro) ;; variable assignment - (syntoken "[a-zA-Z0-9_-]+=" :property *prop-keyword*) + (syntoken "[a-zA-Z0-9_-]+=" :property *prop-keyword*)) + + (syntable :quotes nil nil (syntoken "\"" :nospec t :begin :string :contained t) (syntoken "'" :nospec t :begin :constant :contained t) (syntoken "`" :nospec t :begin :escape :contained t) - (syntoken "\\\"" :nospec t :begin :quoted-string :contained t) - ) + (syntoken "\\\"" :nospec t :begin :quoted-string :contained t)) (syntable :variables nil nil (syntoken "\\$[a-zA-Z0-9_-]+" :property *prop-variable*) @@ -107,4 +108,4 @@ (syntable :comments nil nil (syntoken "(#.*|\\.*))" :property *prop-comment*)) - (synaugment :shared :variables)) + (synaugment :shared :quotes :variables)) -- cgit v1.2.3