# HG changeset patch # User Richard M. Stallman # Date 859687840 0 # Node ID e32d514a22cce5c8f3bbbc62217516eded827360 # Parent 24a4fe3b0ae9cc674803896d999b60b495d4fe65 (sh-set-shell): If file has no #! line, set the syntax table based on the default shell. diff -r 24a4fe3b0ae9 -r e32d514a22cc lisp/progmodes/sh-script.el --- 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)