diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2020-10-29 13:38:59 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2020-10-29 13:38:59 -0400 |
commit | 7b02d9ba480cdd5710b0cdfefc11facd96b44444 (patch) | |
tree | 3a9337497d6ada6b0c622bd10ec2f8eeb21d7145 /test/manual/indent | |
parent | 372739b4069dee1911606817cf962b6ff8b49bac (diff) | |
download | emacs-7b02d9ba480cdd5710b0cdfefc11facd96b44444.tar.gz emacs-7b02d9ba480cdd5710b0cdfefc11facd96b44444.tar.bz2 emacs-7b02d9ba480cdd5710b0cdfefc11facd96b44444.zip |
* lisp/progmodes/tcl.el: Better match Tcl string formation rules (bug#39277)
(tcl--word-delimiters): New const.
(tcl--syntax-of-quote): New function.
(tcl-syntax-propertize-function): Use them.
(tcl-mode): Enable `syntax-propertize-multiline`.
* test/manual/indent/tcl.tcl: New file.
Diffstat (limited to 'test/manual/indent')
-rw-r--r-- | test/manual/indent/tcl.tcl | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/manual/indent/tcl.tcl b/test/manual/indent/tcl.tcl new file mode 100644 index 00000000000..c3781533ca4 --- /dev/null +++ b/test/manual/indent/tcl.tcl @@ -0,0 +1,22 @@ +# Some sample code that tries to exercise the font-lock +# of various forms of writing strings. + +puts "hello}"; # Top-level strings can contain unescaped closing braces! + +puts a"b; # Non-delimited strings can contain quotes! +puts a""b; # Even several of them! + +proc foo1 {} { + puts "hello"; # Normal case! + puts "hello\}; # This will signal an error when `foo1` is called! +} + +proc foo2 {} { + puts "hello; # This will also signal an error when `foo2` is called! +} + +proc foo3 {} { + puts a"b; # This will not signal an error! + puts a""b"; # And that won't either! + puts "a""b"; # But this will! +} |