Subject: bug#97: regression in Emacs 22 recognizing Tcl mode

From: "William B. Parsons" <[email-masked]>
Date: Sat, 29 Mar 2008 10:46:08 -0400 (EDT)

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the [email-masked] mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.3.1 (i386--freebsd, X toolkit, Xaw3d scroll bars)
 of 2006-03-16 on gohan31.freebsd.org
configured using `configure  --x-libraries=/usr/X11R6/lib --x-includes=/usr/X11R6/include --prefix=/usr/local i386--freebsd'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

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

------
isis% cat test.tcl
#!/bin/sh
#\
exec tclsh "$0" ${1+"$@"}
puts test
------

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