aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2010-05-12 20:44:22 -0400
committerStefan Monnier2010-05-12 20:44:22 -0400
commit791ffe1ce251f03d8cd51b4f67b56b975bd12083 (patch)
tree5ff21dc0b43dc935211035ecc3ed0bf72ae6aacf
parent5a70d10f7874061ffbfa2591990b1ceeca5aed96 (diff)
downloademacs-791ffe1ce251f03d8cd51b4f67b56b975bd12083.tar.gz
emacs-791ffe1ce251f03d8cd51b4f67b56b975bd12083.zip
* progmodes/sh-script.el (sh-mode): Use define-derived-mode.
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/progmodes/sh-script.el10
2 files changed, 4 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 45f1167412a..4b73a4fd6df 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,7 @@
12010-05-13 Stefan Monnier <monnier@iro.umontreal.ca> 12010-05-13 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * progmodes/sh-script.el (sh-mode): Use define-derived-mode.
4
3 * dos-fns.el: Add "dos-" prefix for namespace control. 5 * dos-fns.el: Add "dos-" prefix for namespace control.
4 (convert-standard-filename): Define as alias for 6 (convert-standard-filename): Define as alias for
5 dos-convert-standard-filename but only if applicable. 7 dos-convert-standard-filename but only if applicable.
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.")
1480;; mode-command and utility functions 1480;; mode-command and utility functions
1481 1481
1482;;;###autoload 1482;;;###autoload
1483(defun sh-mode () 1483(define-derived-mode sh-mode prog-mode "Shell-script"
1484 "Major mode for editing shell scripts. 1484 "Major mode for editing shell scripts.
1485This mode works for many shells, since they all have roughly the same syntax, 1485This mode works for many shells, since they all have roughly the same syntax,
1486as far as commands, arguments, variables, pipes, comments etc. are concerned. 1486as 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 1533
1534If your shell gives error messages with line numbers, you can use \\[executable-interpret] 1534If your shell gives error messages with line numbers, you can use \\[executable-interpret]
1535with your script for an edit-interpret-debug cycle." 1535with your script for an edit-interpret-debug cycle."
1536 (interactive)
1537 (kill-all-local-variables)
1538 (setq major-mode 'sh-mode
1539 mode-name "Shell-script")
1540 (use-local-map sh-mode-map)
1541 (make-local-variable 'skeleton-end-hook) 1536 (make-local-variable 'skeleton-end-hook)
1542 (make-local-variable 'paragraph-start) 1537 (make-local-variable 'paragraph-start)
1543 (make-local-variable 'paragraph-separate) 1538 (make-local-variable 'paragraph-separate)
@@ -1613,8 +1608,7 @@ with your script for an edit-interpret-debug cycle."
1613 "sh") 1608 "sh")
1614 (t 1609 (t
1615 sh-shell-file)) 1610 sh-shell-file))
1616 nil nil) 1611 nil nil))
1617 (run-mode-hooks 'sh-mode-hook))
1618 1612
1619;;;###autoload 1613;;;###autoload
1620(defalias 'shell-script-mode 'sh-mode) 1614(defalias 'shell-script-mode 'sh-mode)