From: Richard M. Stallman Date: Sun, 30 Mar 1997 02:10:40 +0000 (+0000) Subject: (sh-set-shell): If file has no #! line, X-Git-Tag: emacs-20.1~2685 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=22d5cb5048471772c298e782299172dad37cf014;p=emacs.git (sh-set-shell): If file has no #! line, set the syntax table based on the default shell. --- diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index da6951b6f8a..1ae3b0a3ce8 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -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)) ;;;###autoload (defalias 'shell-script-mode 'sh-mode)