Commit 22d5cb50 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(sh-set-shell): If file has no #! line,

set the syntax table based on the default shell.
parent 9479d258
......@@ -663,7 +663,10 @@ with your script for an edit-interpret-debug cycle."
(buffer-substring (match-beginning 2)
(match-end 2))))))
(if interpreter
(sh-set-shell interpreter nil nil)))
(sh-set-shell interpreter nil nil)
;; If we don't know the shell for this file,
;; set the syntax table anyway, for the user's normal choice of shell.
(set-syntax-table (sh-feature sh-mode-syntax-table))))
(run-hooks 'sh-mode-hook))
(defalias 'shell-script-mode 'sh-mode)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment