Hello, While Emacs correctly picks makefile-gmake-mode when visiting a file with the following shebang: #!/usr/bin/make -f It fails to do so for this shebang: #!/usr/bin/env -S make -f env(1) suggests -S is the idiomatic way to pass arguments to programs in shebangs: > -S/--split-string usage in scripts > The -S option allows specifying multiple parameters in a script. > Running a script named 1.pl containing the following first line: > > #!/usr/bin/env -S perl -w -T > ... > > Will execute perl -w -T 1.pl . > > Without the '-S' parameter the script will likely fail with: > > /usr/bin/env: 'perl -w -T': No such file or directory I've poked at lisp/files.el; the attached diff seems sufficient to make Emacs pick makefile-gmake-mode .