# HG changeset patch # User Richard M. Stallman # Date 1006340800 0 # Node ID b46a4ee1a05d350a1d8d9519585d0ae5f2053482 # Parent 809d8f73caafda54ecb16384915e9829354c7fb0 (sh-mode): Don't use define-derived-mode. diff -r 809d8f73caaf -r b46a4ee1a05d lisp/progmodes/sh-script.el --- 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)