From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleksandr Gavenko Newsgroups: gmane.emacs.help Subject: Changing sh-mode shell type. Date: Thu, 27 Oct 2011 16:52:45 +0300 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1319723590 24893 80.91.229.12 (27 Oct 2011 13:53:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 27 Oct 2011 13:53:10 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 27 15:53:06 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RJQOH-0008EE-0O for geh-help-gnu-emacs@m.gmane.org; Thu, 27 Oct 2011 15:53:05 +0200 Original-Received: from localhost ([::1]:36841 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJQOG-00045E-LY for geh-help-gnu-emacs@m.gmane.org; Thu, 27 Oct 2011 09:53:04 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:44465) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJQO9-000453-QS for help-gnu-emacs@gnu.org; Thu, 27 Oct 2011 09:53:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RJQO4-0001fx-2I for help-gnu-emacs@gnu.org; Thu, 27 Oct 2011 09:52:57 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:43779) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJQO3-0001ft-SD for help-gnu-emacs@gnu.org; Thu, 27 Oct 2011 09:52:52 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RJQO3-00087l-AJ for help-gnu-emacs@gnu.org; Thu, 27 Oct 2011 15:52:51 +0200 Original-Received: from 91.193.68.214 ([91.193.68.214]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 Oct 2011 15:52:51 +0200 Original-Received: from gavenko by 91.193.68.214 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 27 Oct 2011 15:52:51 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 28 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 91.193.68.214 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:82664 Archived-At: 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??