Emacs: Set sh-mode interpreter properly on first start
parent
17324fe2e6
commit
36af4a2e10
|
@ -3,7 +3,8 @@
|
||||||
;;==============================================================================
|
;;==============================================================================
|
||||||
|
|
||||||
(setq sh-indent-comment t)
|
(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)
|
;; (setq-default sh-shell 'sh)
|
||||||
|
|
||||||
(defun sh-set-interpreter ()
|
(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
|
- Once sh-shell is set, sh-shell-file is changed accordingly. In
|
||||||
default Emacs, sh-shell-file is always the same."
|
default Emacs, sh-shell-file is always the same."
|
||||||
(interactive)
|
(interactive)
|
||||||
(setq-local sh-shell-file sh-shell-file) ; Useful only the first time this hook is loaded.
|
|
||||||
(sh-set-shell
|
(sh-set-shell
|
||||||
(cond ((save-excursion
|
(cond ((save-excursion
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
|
|
Loading…
Reference in New Issue