From fc54c835181eb88a748d2fd49b7a4c78b9fe82ee Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sat, 5 Dec 2020 10:41:03 -0500 Subject: * lisp/progmodes/perl-mode.el: Fix handling of s'foo'bar' (perl-syntax-propertize-function): Don't put a syntax-property on regexp-op delimiters if they're already handled correctly by the normal syntax tables. (perl-syntax-propertize-special-constructs): Mark the middle quote of s'foo'bar' as punctuation. * test/manual/indent/perl.perl: Add new test cases. --- test/manual/indent/perl.perl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test/manual/indent/perl.perl') diff --git a/test/manual/indent/perl.perl b/test/manual/indent/perl.perl index 853aec49245..6ec04303b4f 100755 --- a/test/manual/indent/perl.perl +++ b/test/manual/indent/perl.perl @@ -81,3 +81,17 @@ return 'W' if #/^Not Available on Mobile/m; #W=Web only # A "y|abc|def|" shouldn't interfere when inside a string! $toto = " x \" string\""; $toto = " y \" string\""; # This is not the `y' operator! + + +# Tricky cases from Harald Jörg +$_ = "abcabc\n"; +s:abc:def:g; # FIXME: the initial s is fontified like a label, and indented + +s'def'ghi'g; # The middle ' should not end the quoting. +s"ghi"ijk"g; # The middle ' should not end the quoting. + +s#ijk#lmn#g; # This is a regular expression sustitution. + +s #lmn#opq#g; # FIXME: this should be a comment starting with "#lmn" + /lmn/rst/g; # and this is the actual regular expression +print; # prints "rstrst\n" -- cgit v1.2.3