aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-03-30 02:10:40 +0000
committerRichard M. Stallman1997-03-30 02:10:40 +0000
commit22d5cb5048471772c298e782299172dad37cf014 (patch)
tree2c0be418f127ef6a3e21f49e8976a3f55ac6a1c0
parent9479d258c9798cfb9ac6b54e0df9edd40e50a758 (diff)
downloademacs-22d5cb5048471772c298e782299172dad37cf014.tar.gz
emacs-22d5cb5048471772c298e782299172dad37cf014.zip
(sh-set-shell): If file has no #! line,
set the syntax table based on the default shell.
-rw-r--r--lisp/progmodes/sh-script.el5
1 files changed, 4 insertions, 1 deletions
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."
663 (buffer-substring (match-beginning 2) 663 (buffer-substring (match-beginning 2)
664 (match-end 2)))))) 664 (match-end 2))))))
665 (if interpreter 665 (if interpreter
666 (sh-set-shell interpreter nil nil))) 666 (sh-set-shell interpreter nil nil)
667 ;; If we don't know the shell for this file,
668 ;; set the syntax table anyway, for the user's normal choice of shell.
669 (set-syntax-table (sh-feature sh-mode-syntax-table))))
667 (run-hooks 'sh-mode-hook)) 670 (run-hooks 'sh-mode-hook))
668;;;###autoload 671;;;###autoload
669(defalias 'shell-script-mode 'sh-mode) 672(defalias 'shell-script-mode 'sh-mode)