summaryrefslogtreecommitdiff
path: root/lisp/progmodes/sh-script.el
diff options
context:
space:
mode:
authorKenichi Handa <handa@etlken>2010-05-14 13:15:58 +0900
committerKenichi Handa <handa@etlken>2010-05-14 13:15:58 +0900
commitccd3ce49e08b4f0c0e1bcbb34e9055ca4002e21c (patch)
tree0f53c077154c7cd5f05b339d91905dfd2391679d /lisp/progmodes/sh-script.el
parent82ebc97b11a369303345927c98e7bc69928c9117 (diff)
parent508197067c434b0111bcb6ded742d424bb738ece (diff)
downloademacs-ccd3ce49e08b4f0c0e1bcbb34e9055ca4002e21c.tar.gz
emacs-ccd3ce49e08b4f0c0e1bcbb34e9055ca4002e21c.tar.bz2
emacs-ccd3ce49e08b4f0c0e1bcbb34e9055ca4002e21c.zip
merge trunk
Diffstat (limited to 'lisp/progmodes/sh-script.el')
-rw-r--r--lisp/progmodes/sh-script.el10
1 files changed, 2 insertions, 8 deletions
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 610fa14489a..eca6d5fbe7b 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -1480,7 +1480,7 @@ frequently editing existing scripts with different styles.")
;; mode-command and utility functions
;;;###autoload
-(defun sh-mode ()
+(define-derived-mode sh-mode prog-mode "Shell-script"
"Major mode for editing shell scripts.
This mode works for many shells, since they all have roughly the same syntax,
as far as commands, arguments, variables, pipes, comments etc. are concerned.
@@ -1533,11 +1533,6 @@ indicate what shell it is use `sh-alias-alist' to translate.
If your shell gives error messages with line numbers, you can use \\[executable-interpret]
with your script for an edit-interpret-debug cycle."
- (interactive)
- (kill-all-local-variables)
- (setq major-mode 'sh-mode
- mode-name "Shell-script")
- (use-local-map sh-mode-map)
(make-local-variable 'skeleton-end-hook)
(make-local-variable 'paragraph-start)
(make-local-variable 'paragraph-separate)
@@ -1613,8 +1608,7 @@ with your script for an edit-interpret-debug cycle."
"sh")
(t
sh-shell-file))
- nil nil)
- (run-mode-hooks 'sh-mode-hook))
+ nil nil))
;;;###autoload
(defalias 'shell-script-mode 'sh-mode)