diff options
Diffstat (limited to 'lisp/shell.el')
| -rw-r--r-- | lisp/shell.el | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/shell.el b/lisp/shell.el index 6a145ae1569..2adfc79618a 100644 --- a/lisp/shell.el +++ b/lisp/shell.el | |||
| @@ -272,6 +272,8 @@ This is effective only if directory tracking is enabled." | |||
| 272 | :type '(choice (const :tag "None" nil) file) | 272 | :type '(choice (const :tag "None" nil) file) |
| 273 | :group 'shell) | 273 | :group 'shell) |
| 274 | 274 | ||
| 275 | ;; Note: There are no explicit references to the variable `explicit-csh-args'. | ||
| 276 | ;; It is used implicitly by M-x shell when the shell is `csh'. | ||
| 275 | (defcustom explicit-csh-args | 277 | (defcustom explicit-csh-args |
| 276 | (if (eq system-type 'hpux) | 278 | (if (eq system-type 'hpux) |
| 277 | ;; -T persuades HP's csh not to think it is smarter | 279 | ;; -T persuades HP's csh not to think it is smarter |
| @@ -283,12 +285,15 @@ Value is a list of strings, which may be nil." | |||
| 283 | :type '(repeat (string :tag "Argument")) | 285 | :type '(repeat (string :tag "Argument")) |
| 284 | :group 'shell) | 286 | :group 'shell) |
| 285 | 287 | ||
| 288 | ;; Note: There are no explicit references to the variable `explicit-bash-args'. | ||
| 289 | ;; It is used implicitly by M-x shell when the interactive shell is `bash'. | ||
| 286 | (defcustom explicit-bash-args | 290 | (defcustom explicit-bash-args |
| 287 | ;; Tell bash not to use readline, except for bash 1.x which doesn't grook --noediting. | ||
| 288 | ;; Bash 1.x has -nolineediting, but process-send-eof cannot terminate bash if we use it. | ||
| 289 | (let* ((prog (or (and (boundp 'explicit-shell-file-name) explicit-shell-file-name) | 291 | (let* ((prog (or (and (boundp 'explicit-shell-file-name) explicit-shell-file-name) |
| 290 | (getenv "ESHELL") shell-file-name)) | 292 | (getenv "ESHELL") shell-file-name)) |
| 291 | (name (file-name-nondirectory prog))) | 293 | (name (file-name-nondirectory prog))) |
| 294 | ;; Tell bash not to use readline, except for bash 1.x which | ||
| 295 | ;; doesn't grook --noediting. Bash 1.x has -nolineediting, but | ||
| 296 | ;; process-send-eof cannot terminate bash if we use it. | ||
| 292 | (if (and (not purify-flag) | 297 | (if (and (not purify-flag) |
| 293 | (equal name "bash") | 298 | (equal name "bash") |
| 294 | (file-executable-p prog) | 299 | (file-executable-p prog) |
| @@ -483,7 +488,9 @@ This function can be put on `comint-output-filter-functions'. | |||
| 483 | The argument STRING is ignored." | 488 | The argument STRING is ignored." |
| 484 | (let ((pmark (process-mark (get-buffer-process (current-buffer))))) | 489 | (let ((pmark (process-mark (get-buffer-process (current-buffer))))) |
| 485 | (save-excursion | 490 | (save-excursion |
| 486 | (goto-char (or comint-last-output-start (point-min))) | 491 | (goto-char (or (and (markerp comint-last-output-start) |
| 492 | (marker-position comint-last-output-start)) | ||
| 493 | (point-min))) | ||
| 487 | (while (re-search-forward "[\C-a\C-b]" pmark t) | 494 | (while (re-search-forward "[\C-a\C-b]" pmark t) |
| 488 | (replace-match ""))))) | 495 | (replace-match ""))))) |
| 489 | 496 | ||