diff options
| author | Richard M. Stallman | 1994-01-09 17:11:57 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-01-09 17:11:57 +0000 |
| commit | 4f99443b8efec92c98f73c3723e80663db8a4fcf (patch) | |
| tree | fca3ca5c294c702cb971f10ad96b067e37db89b8 | |
| parent | 96d63b2c8b165c5a879f4d65903fc42cb29e95b5 (diff) | |
| download | emacs-4f99443b8efec92c98f73c3723e80663db8a4fcf.tar.gz emacs-4f99443b8efec92c98f73c3723e80663db8a4fcf.zip | |
(shell-input-autoexpand): New variable.
(shell-mode): Set comint-input-autoexpand.
(shell-mode): Don't call shell-dirstack-message.
| -rw-r--r-- | lisp/shell.el | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lisp/shell.el b/lisp/shell.el index 18fd50f822d..05179863d94 100644 --- a/lisp/shell.el +++ b/lisp/shell.el | |||
| @@ -205,6 +205,18 @@ This mirrors the optional behavior of tcsh.") | |||
| 205 | "*Args passed to inferior shell by M-x shell, if the shell is csh. | 205 | "*Args passed to inferior shell by M-x shell, if the shell is csh. |
| 206 | Value is a list of strings, which may be nil.") | 206 | Value is a list of strings, which may be nil.") |
| 207 | 207 | ||
| 208 | (defvar shell-input-autoexpand 'history | ||
| 209 | "*If non-nil, expand input command history references on completion. | ||
| 210 | This mirrors the optional behavior of tcsh (its autoexpand and histlit). | ||
| 211 | |||
| 212 | If the value is `input', then the expansion is seen on input. | ||
| 213 | If the value is `history', then the expansion is only when inserting | ||
| 214 | into the buffer's input ring. See also `comint-magic-space' and | ||
| 215 | `comint-dynamic-complete'. | ||
| 216 | |||
| 217 | This variable supplies a default for `comint-input-autoexpand', | ||
| 218 | for Shell mode only.") | ||
| 219 | |||
| 208 | ;;; All the above vars aren't prefixed "cmushell-" to make them | 220 | ;;; All the above vars aren't prefixed "cmushell-" to make them |
| 209 | ;;; backwards compatible w/shell.el and old .emacs files. | 221 | ;;; backwards compatible w/shell.el and old .emacs files. |
| 210 | 222 | ||
| @@ -292,6 +304,7 @@ cause the window to scroll to the end of the buffer." | |||
| 292 | (make-local-variable 'shell-dirtrackp) | 304 | (make-local-variable 'shell-dirtrackp) |
| 293 | (setq shell-dirtrackp t) | 305 | (setq shell-dirtrackp t) |
| 294 | (setq comint-input-sentinel 'shell-directory-tracker) | 306 | (setq comint-input-sentinel 'shell-directory-tracker) |
| 307 | (setq comint-input-autoexpand shell-input-autoexpand) | ||
| 295 | ;; shell-dependent assignments. | 308 | ;; shell-dependent assignments. |
| 296 | (let ((shell (car (process-command (get-buffer-process (current-buffer)))))) | 309 | (let ((shell (car (process-command (get-buffer-process (current-buffer)))))) |
| 297 | (setq comint-input-ring-file-name | 310 | (setq comint-input-ring-file-name |
| @@ -301,8 +314,7 @@ cause the window to scroll to the end of the buffer." | |||
| 301 | ((string-match "ksh$" shell) "~/.sh_history") | 314 | ((string-match "ksh$" shell) "~/.sh_history") |
| 302 | (t "~/.history"))))) | 315 | (t "~/.history"))))) |
| 303 | (run-hooks 'shell-mode-hook) | 316 | (run-hooks 'shell-mode-hook) |
| 304 | (comint-read-input-ring t) | 317 | (comint-read-input-ring t)) |
| 305 | (shell-dirstack-message)) | ||
| 306 | 318 | ||
| 307 | ;;;###autoload | 319 | ;;;###autoload |
| 308 | (defun shell () | 320 | (defun shell () |