From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lowell Gilbert Newsgroups: gmane.emacs.help Subject: Re: Can priority of interpreter-mode-alist over auto-mode-alist be changed? Date: Fri, 28 Mar 2008 15:22:33 -0400 Message-ID: <44od8ymz5y.fsf@be-well.ilk.org> References: <44iqz6ooyl.fsf@be-well.ilk.org> <654hlcF2emjjuU1@mid.individual.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1206733239 10252 80.91.229.12 (28 Mar 2008 19:40:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Mar 2008 19:40:39 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 28 20:41:09 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JfKRi-0006AI-QW for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Mar 2008 20:41:03 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JfKR7-0002cq-Cg for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Mar 2008 15:40:25 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!nntp.speakeasy.net!news.speakeasy.net.POSTED!not-for-mail Original-NNTP-Posting-Date: Fri, 28 Mar 2008 14:22:33 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (berkeley-unix) Cancel-Lock: sha1:PG0h6/ZzHGB5D+Cke9/T4U8Qs4o= Original-Lines: 40 X-Usenet-Provider: http://www.giganews.com Original-NNTP-Posting-Host: 66.92.78.145 Original-X-Trace: sv3-t96JcBDupRC87HFYwBeSru3xOFVoDfSLyntURV+BgVOZCa4G+Zqk8lvdbRVJbYLQQ2tbQyCj/qqh0bP!raDdJSCzVWqJGUZ0iTXEQoaZ98B4oemxkC9yaYwIOX/hAsULqoGNbKLL39cOL+qt1oyYheEvOu7J!ACldDjqS2g== Original-X-Complaints-To: abuse@speakeasy.net X-DMCA-Complaints-To: abuse@speakeasy.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.37 Original-Xref: shelby.stanford.edu gnu.emacs.help:157409 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:52780 Archived-At: Will Parsons writes: > Lowell Gilbert wrote: >> Peter Dyballa writes: >> >>> Am 27.03.2008 um 13:42 schrieb skuhagen: >>>> #!/bin/sh >>>> #\ >>>> exec tclsh "$0" "$@" >>> >>> Why can't you use >>> >>> #!/bin/tclsh >>> >>> directly? >> >> In some cases, because the script has to be run on multiple machines >> that have different paths to tclsh. > >> I've used "Local Variables" sections to solve that in the past. >> I wouldn't be surprised if there is a better way these days. > > This seems to be a regression with Emacs 22. I, too, have tcl scripts > which begin with the common Tcl idiom cited by the OP, and they are > correctly recognized as tcl mode in Emacs 21 but shell mode in Emacs 22. > > So, I'd like to join the OP in asking how to get the original behaviour > back? Three minutes of investigation led me to think that you're looking for the variable "magic-mode-alist". I think that what's happening is that your scripts end in ".tcl" and the way it used to work was that auto-mode-alist used tcl-mode because of the filename. [If the scripts don't end in .tcl, I don't see how it ever worked without a hint inside the file.] Now something is overriding auto-mode-alist, and it might be the "magic" mode-guessing. There are other possibilities, but the ones I thought to check don't seem to have changed lately. [e.g., interpeter-mode-alist]