changeset 41348:b46a4ee1a05d

(sh-mode): Don't use define-derived-mode.
author Richard M. Stallman <rms@gnu.org>
date Wed, 21 Nov 2001 11:06:40 +0000
parents 809d8f73caaf
children 8dd8d78194a1
files lisp/progmodes/sh-script.el
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/sh-script.el	Wed Nov 21 11:03:35 2001 +0000
+++ b/lisp/progmodes/sh-script.el	Wed Nov 21 11:06:40 2001 +0000
@@ -1227,7 +1227,7 @@
 (put 'sh-mode 'mode-class 'special)
 
 ;;;###autoload
-(define-derived-mode sh-mode nil "Shell-script"
+(defun sh-mode ()
   "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.
@@ -1280,6 +1280,11 @@
 
 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)