changeset 17260:e32d514a22cc

(sh-set-shell): If file has no #! line, set the syntax table based on the default shell.
author Richard M. Stallman <rms@gnu.org>
date Sun, 30 Mar 1997 02:10:40 +0000
parents 24a4fe3b0ae9
children 15216759d2a4
files lisp/progmodes/sh-script.el
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/sh-script.el	Sat Mar 29 08:51:22 1997 +0000
+++ b/lisp/progmodes/sh-script.el	Sun Mar 30 02:10:40 1997 +0000
@@ -663,7 +663,10 @@
 	       (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)