aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/shell.el
diff options
context:
space:
mode:
authorStefan Monnier2000-11-21 21:33:45 +0000
committerStefan Monnier2000-11-21 21:33:45 +0000
commit9f299ecba0435faccf359b47dfea78516d8be275 (patch)
tree1784854fc7d182daff50f04e0fb7f5a45322d480 /lisp/shell.el
parent2e1fbba4e531b5fa28432fc9f8b8a0ddc93dcaa0 (diff)
downloademacs-9f299ecba0435faccf359b47dfea78516d8be275.tar.gz
emacs-9f299ecba0435faccf359b47dfea78516d8be275.zip
(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.")
337 337
338(put 'shell-mode 'mode-class 'special) 338(put 'shell-mode 'mode-class 'special)
339 339
340(defun shell-mode () 340(define-derived-mode shell-mode comint-mode "Shell"
341 "Major mode for interacting with an inferior shell. 341 "Major mode for interacting with an inferior shell.
342\\[comint-send-input] after the end of the process' output sends the text from 342\\[comint-send-input] after the end of the process' output sends the text from
343 the end of process to the end of the current line. 343 the end of process to the end of the current line.
@@ -389,11 +389,6 @@ Variables `comint-output-filter-functions', a hook, and
389`comint-scroll-to-bottom-on-input' and `comint-scroll-to-bottom-on-output' 389`comint-scroll-to-bottom-on-input' and `comint-scroll-to-bottom-on-output'
390control whether input and output cause the window to scroll to the end of the 390control whether input and output cause the window to scroll to the end of the
391buffer." 391buffer."
392 (interactive)
393 (comint-mode)
394 (setq major-mode 'shell-mode)
395 (setq mode-name "Shell")
396 (use-local-map shell-mode-map)
397 (setq comint-prompt-regexp shell-prompt-pattern) 392 (setq comint-prompt-regexp shell-prompt-pattern)
398 (setq comint-completion-fignore shell-completion-fignore) 393 (setq comint-completion-fignore shell-completion-fignore)
399 (setq comint-delimiter-argument-list shell-delimiter-argument-list) 394 (setq comint-delimiter-argument-list shell-delimiter-argument-list)
@@ -438,7 +433,6 @@ buffer."
438 (cond ((string-equal shell "sh") "pwd") 433 (cond ((string-equal shell "sh") "pwd")
439 ((string-equal shell "ksh") "echo $PWD ~-") 434 ((string-equal shell "ksh") "echo $PWD ~-")
440 (t "dirs")))) 435 (t "dirs"))))
441 (run-hooks 'shell-mode-hook)
442 (comint-read-input-ring t)) 436 (comint-read-input-ring t))
443 437
444(defun shell-write-history-on-exit (process event) 438(defun shell-write-history-on-exit (process event)