From 22d5cb5048471772c298e782299172dad37cf014 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 30 Mar 1997 02:10:40 +0000 Subject: [PATCH] (sh-set-shell): If file has no #! line, set the syntax table based on the default shell. --- lisp/progmodes/sh-script.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- 2.39.2