summaryrefslogtreecommitdiff
path: root/lisp/shell.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2000-11-21 21:33:45 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2000-11-21 21:33:45 +0000
commitb27e679d468be9208c80869a14a7140f11e6738b (patch)
tree7cb2aa8bd420864b4e4f4830b5a82a3ce0411650 /lisp/shell.el
parentc0bf7fb54543c56f531a81710225ec5e854819e1 (diff)
downloademacs-b27e679d468be9208c80869a14a7140f11e6738b.tar.gz
(shell-mode): Use define-derived-mode.
Diffstat (limited to 'lisp/shell.el')
-rw-r--r--lisp/shell.el8
1 files changed, 1 insertions, 7 deletions
diff --git a/lisp/shell.el b/lisp/shell.el
index 966afc0a660..d3ec4ee8a9f 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -337,7 +337,7 @@ Thus, this does not include the shell's current directory.")
(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 @@ Variables `comint-output-filter-functions', a hook, and
`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 @@ buffer."
(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)