From 36af4a2e106fef48e283f0e715deada869a44c75 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Thu, 13 Mar 2014 11:21:28 +0100 Subject: [PATCH] Emacs: Set sh-mode interpreter properly on first start --- .emacs.d/mode-sh.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.emacs.d/mode-sh.el b/.emacs.d/mode-sh.el index fe569a55..81dcac5d 100644 --- a/.emacs.d/mode-sh.el +++ b/.emacs.d/mode-sh.el @@ -3,7 +3,8 @@ ;;============================================================================== (setq sh-indent-comment t) -(setq-default sh-shell-file "/bin/sh") +(setq-local sh-shell-file "/bin/sh") ; Useful for the first time this hook is loaded. +(setq-default sh-shell-file sh-shell-file) ;; (setq-default sh-shell 'sh) (defun sh-set-interpreter () @@ -22,7 +23,6 @@ The advantages of this function over the vanilla code are: - Once sh-shell is set, sh-shell-file is changed accordingly. In default Emacs, sh-shell-file is always the same." (interactive) - (setq-local sh-shell-file sh-shell-file) ; Useful only the first time this hook is loaded. (sh-set-shell (cond ((save-excursion (goto-char (point-min))