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 5d57e99..d4d7da9 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 02722aa..ae5db30 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;