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

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

Changing sh-mode shell type.


From: Oleksandr Gavenko
Subject: Changing sh-mode shell type.
Date: Thu, 27 Oct 2011 16:52:45 +0300
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1

According to 'sh-mode':

  If you generally program a shell different from your login shell
  you can set `sh-shell-file' accordingly.

As usual I try add:

  # -*- sh-shell-file: "/bin/zsh"; mode: sh -*-

but it set to "bash" in any case...

I debug issue and found that when you enter into
'sh-mode' function 'sh-shell-file' have value "/bin/bash"
as it set by:

  (defcustom sh-shell-file ...)

so executed:

  (sh-set-shell
   (cond ((save-excursion
        ....  ....
         (t
          sh-shell-file))
    nil nil)

It is possible pass file local variable before mode activation
code was executed??




reply via email to

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