changeset 33706:8c460ceb4916

(shell-mode): Use define-derived-mode.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 21 Nov 2000 21:33:45 +0000
parents 273d5b4aba82
children 2b9847c18f31
files lisp/shell.el
diffstat 1 files changed, 1 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/shell.el	Tue Nov 21 21:31:16 2000 +0000
+++ b/lisp/shell.el	Tue Nov 21 21:33:45 2000 +0000
@@ -337,7 +337,7 @@
 
 (put 'shell-mode 'mode-class 'special)
 
-(defun shell-mode ()
+(define-derived-mode shell-mode comint-mode "Shell"
   "Major mode for interacting with an inferior shell.
 \\[comint-send-input] after the end of the process' output sends the text from
     the end of process to the end of the current line.
@@ -389,11 +389,6 @@
 `comint-scroll-to-bottom-on-input' and `comint-scroll-to-bottom-on-output'
 control whether input and output cause the window to scroll to the end of the
 buffer."
-  (interactive)
-  (comint-mode)
-  (setq major-mode 'shell-mode)
-  (setq mode-name "Shell")
-  (use-local-map shell-mode-map)
   (setq comint-prompt-regexp shell-prompt-pattern)
   (setq comint-completion-fignore shell-completion-fignore)
   (setq comint-delimiter-argument-list shell-delimiter-argument-list)
@@ -438,7 +433,6 @@
 	  (cond ((string-equal shell "sh") "pwd")
 		((string-equal shell "ksh") "echo $PWD ~-")
 		(t "dirs"))))
-  (run-hooks 'shell-mode-hook)
   (comint-read-input-ring t))
 
 (defun shell-write-history-on-exit (process event)