Kévin Le Gouguec writes: > Questions before proceeding to ChangeLog entries & regression tests: For better or worse, I ended up proceeding to both these things, and then some. Let me know if the attached patches make sense; tested with make -j8 bootstrap && make -C test files-tests Tentative answers to my questions: > 1. Is this something we would like Emacs to recognize out of the box, or > is it too niche? Assuming yes. > 2. What about the more general forms shown in (info "(coreutils) env > invocation")? > > #!/usr/bin/env -[v]S[OPTION]... [NAME=VALUE]... COMMAND [ARGS]... Didn't go as far as handling -v nor NAME=VALUE pairs, but that could be added later if we ever feel like it. > 3. Assuming we do want to amend that regexp, would it be possible to use > rx here? OT1H guessing "no" because files.el is pre-reloaded, whereas > rx.el is not; OTOH I see that files.el requires easy-mmode at > compile-time, and that package does not show up in loadup.el, so… > settling for "maybe?" Figured rx was similar to pcase in that regard: * They need to be required explicitly despite their macros being "autoloaded", because files.el is loaded during bootstrap before autoloading is set up. * Somehow that does not cause them to be preloaded? At least going by emacs -Q, * featurep returns nil, * preloaded-file-list does not include them.