Subject: Re: regression in Emacs 22 recognizing Tcl mode

From: Chong Yidong <[email-masked]>
Date: Sat, 05 Apr 2008 18:03:46 -0400

The following valid Tcl script is recognized automatically as Tcl mode
  under Emacs 21 but as shell mode under Emacs 22:

  #!/bin/sh
  exec tclsh "$0" ${1+"$@"}
  puts test

  i.e., the shebang overrides the .tcl extension in determining
  programming mode.

If the shebang specified /bin/tcl, it would be recognized as a Tcl file.
In ambiguous situations like this, it's better to use a `-*-' line or
local variables list (see the node "Choosing Modes" in the Emacs
manual).