From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: sh-script.el and magic numbers Date: Tue, 21 Jan 2003 10:49:30 +0000 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <388yxeu69x.fsf@ast.cam.ac.uk> References: <200301190324.VAA14671@eel.dms.auburn.edu> <200301191247.h0JCl1Zs020036@beta.mvs.co.il> <8del78n1ks.fsf@ast.cam.ac.uk> <200301200759.h0K7xGOH007624@beta.mvs.co.il> <200301210045.SAA16966@eel.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1043147678 22450 80.91.224.249 (21 Jan 2003 11:14:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 21 Jan 2003 11:14:38 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18awMV-0005pf-00 for ; Tue, 21 Jan 2003 12:14:35 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18awXp-0001DM-00 for ; Tue, 21 Jan 2003 12:26:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18aw1L-0002bU-0A for emacs-devel@quimby.gnus.org; Tue, 21 Jan 2003 05:52:43 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18aw0F-0002Vk-00 for emacs-devel@gnu.org; Tue, 21 Jan 2003 05:51:35 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18avzH-0002Ni-00 for emacs-devel@gnu.org; Tue, 21 Jan 2003 05:50:51 -0500 Original-Received: from rose.csi.cam.ac.uk ([131.111.8.13]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18avyn-0002Ke-00 for emacs-devel@gnu.org; Tue, 21 Jan 2003 05:50:05 -0500 Original-Received: from cass41.ast.cam.ac.uk ([131.111.69.186]) by rose.csi.cam.ac.uk with esmtp (Exim 4.10) id 18avyI-0001oM-00; Tue, 21 Jan 2003 10:49:34 +0000 Original-Received: from ast.cam.ac.uk (IDENT:LXNBddCkeW1Y74zzcxszQFUsOtmNXeSY@xpc21 [131.111.69.55])h0LAnUNS028551; Tue, 21 Jan 2003 10:49:30 GMT Original-To: Luc Teirlinck X-Attribution: GM Mail-Followup-To: Luc Teirlinck , ehud@unix.mvs.co.il, emacs-devel@gnu.org In-Reply-To: <200301210045.SAA16966@eel.dms.auburn.edu> (Luc Teirlinck's message of "Mon, 20 Jan 2003 18:45:02 -0600 (CST)") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/directory/emacs.html) Original-cc: ehud@unix.mvs.co.il X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:10933 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:10933 Luc Teirlinck wrote: > Suppose your default sh-shell-file is bash and are working on a script > intended for csh. You do not want to use a magic number and maybe do > not want to make the file executable, but you still want all of > sh-script.el to know that you are programming for csh. [No easy way to do that] Yes! I was asking about this in gnu.emacs.help not so long ago (e7bs5txfox.fsf@ast.cam.ac.uk thread). Kevin Rodgers pointed out to me that one could set the variable `sh-shell' as a file local variable to have a given script recognized as a given shell type. This works (mostly), but still leaves the mode-line saying "[bash]" in all cases. That can be fixed with mode-line-process: "[tcsh]" (or whatever). I agree it would be nice if there was some easy way to switch sh-mode between the various different shell flavours with no side effects.