diff options
| author | Stefan Monnier | 2000-11-21 21:33:45 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2000-11-21 21:33:45 +0000 |
| commit | 9f299ecba0435faccf359b47dfea78516d8be275 (patch) | |
| tree | 1784854fc7d182daff50f04e0fb7f5a45322d480 /lisp/shell.el | |
| parent | 2e1fbba4e531b5fa28432fc9f8b8a0ddc93dcaa0 (diff) | |
| download | emacs-9f299ecba0435faccf359b47dfea78516d8be275.tar.gz emacs-9f299ecba0435faccf359b47dfea78516d8be275.zip | |
(shell-mode): Use define-derived-mode.
Diffstat (limited to 'lisp/shell.el')
| -rw-r--r-- | lisp/shell.el | 8 |
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' |
| 390 | control whether input and output cause the window to scroll to the end of the | 390 | control whether input and output cause the window to scroll to the end of the |
| 391 | buffer." | 391 | buffer." |
| 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) |