[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sh-script.el and magic numbers

From: Glenn Morris
Subject: Re: sh-script.el and magic numbers
Date: Tue, 21 Jan 2003 10:49:30 +0000
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/directory/emacs.html)

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
(address@hidden 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]