From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: Can priority of interpreter-mode-alist over auto-mode-alist be changed? Date: Sat, 29 Mar 2008 09:24:19 -0600 Message-ID: References: <44iqz6ooyl.fsf@be-well.ilk.org> <654hlcF2emjjuU1@mid.individual.net> <44od8ymz5y.fsf@be-well.ilk.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1206804348 29763 80.91.229.12 (29 Mar 2008 15:25:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Mar 2008 15:25:48 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Mar 29 16:26:19 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 1Jfcwj-0000k3-B2 for geh-help-gnu-emacs@m.gmane.org; Sat, 29 Mar 2008 16:26:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jfcw7-0000GY-H4 for geh-help-gnu-emacs@m.gmane.org; Sat, 29 Mar 2008 11:25:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jfcv0-0008Pn-3i for help-gnu-emacs@gnu.org; Sat, 29 Mar 2008 11:24:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jfcuy-0008P3-Mx for help-gnu-emacs@gnu.org; Sat, 29 Mar 2008 11:24:29 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jfcuy-0008Os-E9 for help-gnu-emacs@gnu.org; Sat, 29 Mar 2008 11:24:28 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jfcux-0007Ov-Ui for help-gnu-emacs@gnu.org; Sat, 29 Mar 2008 11:24:28 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Jfcuw-0006p7-3z for help-gnu-emacs@gnu.org; Sat, 29 Mar 2008 15:24:26 +0000 Original-Received: from c-67-162-159-170.hsd1.co.comcast.net ([67.162.159.170]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 29 Mar 2008 15:24:26 +0000 Original-Received: from kevin.d.rodgers by c-67-162-159-170.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 29 Mar 2008 15:24:26 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 41 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-67-162-159-170.hsd1.co.comcast.net User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) In-Reply-To: X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:52794 Archived-At: Will Parsons wrote: > Lowell Gilbert wrote: >> 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". > > Perhaps it is, but if so, after reading the description of the variable I > am left with no idea of how to use it to get the desired effect. How about: (add-to-list 'magic-mode-alist (cons (regexp-quote "#\\\nexec tclsh \"$0\" \"$@\"") 'tcl-mode)) -- Kevin Rodgers Denver, Colorado, USA