]> git.eshelyaron.com Git - emacs.git/commitdiff
(sh-set-shell): If file has no #! line,
authorRichard M. Stallman <rms@gnu.org>
Sun, 30 Mar 1997 02:10:40 +0000 (02:10 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 30 Mar 1997 02:10:40 +0000 (02:10 +0000)
set the syntax table based on the default shell.

lisp/progmodes/sh-script.el

index da6951b6f8a5b525a7a204845abee1c586345ee4..1ae3b0a3ce81eef0bd6a2f87ab16c33236041b59 100644 (file)
@@ -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)