diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-11-10 01:47:46 -0200 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-11-10 01:47:46 -0200 |
commit | 9d4a9520409fdb50987be6f4ca2c8afd5b53c994 (patch) | |
tree | 61b409cf4228ea9227c7f236b29724dca77e3109 | |
parent | 0ab2815743d89b1cd283abaf4d2cb77fed4a2df4 (diff) |
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 (`).
-rw-r--r-- | lisp/modules/progmodes/auto.lsp | 13 |
1 files changed, 7 insertions, 6 deletions
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 "(#.*|\\<dnl($|\\>.*))" :property *prop-comment*)) - (synaugment :shared :variables)) + (synaugment :shared :quotes :variables)) |