chiark / gitweb /
&! new esc can be anything
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 13 Nov 2019 00:52:41 +0000 (00:52 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 13 Nov 2019 00:52:41 +0000 (00:52 +0000)
subdirmk/NOTES
subdirmk/generate

index 5d57e99ecb2dcab936010d4734727b16e431dc67..d4d7da942a931055f936c8128c0bb1d0dbd945cf 100644 (file)
@@ -21,9 +21,9 @@ lc is [a-z][-+,0-9_a-z]*(?!\w)
 
 &!<spaces or tabs>     disables & *until* EOL (and disappears)
 
-&!STUFF                STUFF is recognised instead of & (beyond EOL)
-               STUFF is either all ASCII punct or all ASCII alphanum (incl _)
-               any lwsp after STUFF is discarded too
+&!STUFF<lwsp>          STUFF is recognised instead of &
+                       the terminating lwsp is discarded too
+                       may also occur at eol
 
 eg notably
  STUFF!&               now & is recognised instead (ie back to normal)
index 02722aa31bf1a9c037ac07e8ab7c6eda453b4fcb..ae5db303ea79c56504b76070a29f018ab4c9b23f 100755 (executable)
@@ -150,7 +150,7 @@ sub filter_subdir_mk ($$$$$) {
            } elsif (s{^![ \t]+}{}) {
                o $_;
                $_ = '';
-           } elsif (s{^!(\pPosixWord+|\pPosixPunct+)[ \t]*}{}) {
+           } elsif (s{^!(\S+)(?:[ \t]+|$)}{}) {
                $esclit = $1;
                $esc = $esclit;
                $esc =~ s/\W/\\$&/g;