Commit 791ffe1c authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* progmodes/sh-script.el (sh-mode): Use define-derived-mode.

parent 5a70d10f
2010-05-13 Stefan Monnier <monnier@iro.umontreal.ca> 2010-05-13 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/sh-script.el (sh-mode): Use define-derived-mode.
* dos-fns.el: Add "dos-" prefix for namespace control. * dos-fns.el: Add "dos-" prefix for namespace control.
(convert-standard-filename): Define as alias for (convert-standard-filename): Define as alias for
dos-convert-standard-filename but only if applicable. dos-convert-standard-filename but only if applicable.
......
...@@ -1480,7 +1480,7 @@ frequently editing existing scripts with different styles.") ...@@ -1480,7 +1480,7 @@ frequently editing existing scripts with different styles.")
;; mode-command and utility functions ;; mode-command and utility functions
;;;###autoload ;;;###autoload
(defun sh-mode () (define-derived-mode sh-mode prog-mode "Shell-script"
"Major mode for editing shell scripts. "Major mode for editing shell scripts.
This mode works for many shells, since they all have roughly the same syntax, 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. 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. ...@@ -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] If your shell gives error messages with line numbers, you can use \\[executable-interpret]
with your script for an edit-interpret-debug cycle." 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 'skeleton-end-hook)
(make-local-variable 'paragraph-start) (make-local-variable 'paragraph-start)
(make-local-variable 'paragraph-separate) (make-local-variable 'paragraph-separate)
...@@ -1613,8 +1608,7 @@ with your script for an edit-interpret-debug cycle." ...@@ -1613,8 +1608,7 @@ with your script for an edit-interpret-debug cycle."
"sh") "sh")
(t (t
sh-shell-file)) sh-shell-file))
nil nil) nil nil))
(run-mode-hooks 'sh-mode-hook))
;;;###autoload ;;;###autoload
(defalias 'shell-script-mode 'sh-mode) (defalias 'shell-script-mode 'sh-mode)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment