[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13815: Wrong mode for files with awkward shebang lines
From: |
Glenn Morris |
Subject: |
bug#13815: Wrong mode for files with awkward shebang lines |
Date: |
Mon, 25 Feb 2013 22:02:22 -0500 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
Andrew Pennebaker wrote:
> #!/bin/sh
> exec scala "$0" "$@"
[...]
> This creates problems for Emacs, as Emacs uses `file` to detect which major
> mode should be used,
Emacs does not use `file', it uses interpreter-mode-alist (amongst other
things).
> This could be solved a variety of ways, but I think the simplest is to
> prioritize file extension over mimetype when a file extension is available.
It used to work that way prior to Emacs 22.1. Then it was changed for
reasons that were never properly explained IMO.
http://debbugs.gnu.org/3354
All you can do is add a mode: cookie.
Or use /usr/bin/env, IIUC
https://github.com/scala/scala/pull/9