[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r100247: * progmodes/sh-script.el (sh
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r100247: * progmodes/sh-script.el (sh-mode): Use define-derived-mode. |
Date: |
Wed, 12 May 2010 20:44:22 -0400 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 100247
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Wed 2010-05-12 20:44:22 -0400
message:
* progmodes/sh-script.el (sh-mode): Use define-derived-mode.
modified:
lisp/ChangeLog
lisp/progmodes/sh-script.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-05-13 00:35:07 +0000
+++ b/lisp/ChangeLog 2010-05-13 00:44:22 +0000
@@ -1,5 +1,7 @@
2010-05-13 Stefan Monnier <address@hidden>
+ * progmodes/sh-script.el (sh-mode): Use define-derived-mode.
+
* dos-fns.el: Add "dos-" prefix for namespace control.
(convert-standard-filename): Define as alias for
dos-convert-standard-filename but only if applicable.
=== modified file 'lisp/progmodes/sh-script.el'
--- a/lisp/progmodes/sh-script.el 2010-02-28 21:34:58 +0000
+++ b/lisp/progmodes/sh-script.el 2010-05-13 00:44:22 +0000
@@ -1480,7 +1480,7 @@
;; 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 @@
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 @@
"sh")
(t
sh-shell-file))
- nil nil)
- (run-mode-hooks 'sh-mode-hook))
+ nil nil))
;;;###autoload
(defalias 'shell-script-mode 'sh-mode)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r100247: * progmodes/sh-script.el (sh-mode): Use define-derived-mode.,
Stefan Monnier <=