bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#17333: sh-mode: File local variables for setting shell variant


From: Stefan Monnier
Subject: bug#17333: sh-mode: File local variables for setting shell variant
Date: Tue, 29 Apr 2014 11:40:22 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

>> The 'sh-mode' appears to have no means for allowing a non-executable
>> file to declare, in its local variables, the shell variant to use for
>> syntax.
> I'd also like a way to do this.
> In the past I've used
> -*- mode: sh; eval: (sh-set-shell "tcsh" nil nil) -*-
> but it is not great.
> Ideas that come to mind are a bunch of aliases (sh-bash-mode etc) that
> DTRT (yuck?);

Actually I think having sh-csh-mode, sh-sh-mode, and sh-rc-mode would be
a good idea.

> or sh-mode could add something to hack-local-variables-hook that
> respects a file-local `sh-buffer-shell' or somesuch.

The var's name is `sh-shell', and I guess this could make sense for the
"fine tuning" (e.g. distinguish between csh and tcsh), tho I'm not sure
it's worth the trouble.


        Stefan





reply via email to

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