diff options
author | Richard M. Stallman <[email protected]> | 1997-03-30 02:10:40 +0000 |
---|---|---|
committer | Richard M. Stallman <[email protected]> | 1997-03-30 02:10:40 +0000 |
commit | 22d5cb5048471772c298e782299172dad37cf014 (patch) | |
tree | 2c0be418f127ef6a3e21f49e8976a3f55ac6a1c0 | |
parent | 9479d258c9798cfb9ac6b54e0df9edd40e50a758 (diff) |
(sh-set-shell): If file has no #! line,
set the syntax table based on the default shell.
-rw-r--r-- | lisp/progmodes/sh-script.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index da6951b6f8..1ae3b0a3ce 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) |