Subject: bug#9110: closed (Re: bug#9110: how to map sh-mode to mean bash-mode)

From: [email-masked]
Date: Mon, 18 Jul 2011 07:53:45 +0800

>>>>> "GbTS" == GNU bug Tracking System <[email-masked]> writes:
GbTS> (add-hook 'sh-mode-hook
GbTS>           '(lambda () (and buffer-file-name
GbTS>                            (string-match "\\.sh\\'" buffer-file-name)
GbTS>                            (sh-set-shell "bash"))))
Thanks, but that doesn't also cover the case when there is a #!/bin/sh
but no .sh or .bash.