diff options
Diffstat (limited to 'lisp/comint.el')
| -rw-r--r-- | lisp/comint.el | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/lisp/comint.el b/lisp/comint.el index 37550b7b6d9..14913c7ef11 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -423,7 +423,7 @@ field boundaries in a natural way)." | |||
| 423 | (make-obsolete-variable 'comint-use-prompt-regexp-instead-of-fields | 423 | (make-obsolete-variable 'comint-use-prompt-regexp-instead-of-fields |
| 424 | 'comint-use-prompt-regexp "22.1") | 424 | 'comint-use-prompt-regexp "22.1") |
| 425 | 425 | ||
| 426 | (defcustom comint-mode-hook '(turn-on-font-lock) | 426 | (defcustom comint-mode-hook nil |
| 427 | "Hook run upon entry to `comint-mode'. | 427 | "Hook run upon entry to `comint-mode'. |
| 428 | This is run before the process is cranked up." | 428 | This is run before the process is cranked up." |
| 429 | :type 'hook | 429 | :type 'hook |
| @@ -583,7 +583,7 @@ Return not at end copies rest of line to end and sends it. | |||
| 583 | Setting variable `comint-eol-on-send' means jump to the end of the line | 583 | Setting variable `comint-eol-on-send' means jump to the end of the line |
| 584 | before submitting new input. | 584 | before submitting new input. |
| 585 | 585 | ||
| 586 | This mode is customised to create major modes such as Inferior Lisp | 586 | This mode is customized to create major modes such as Inferior Lisp |
| 587 | mode, Shell mode, etc. This can be done by setting the hooks | 587 | mode, Shell mode, etc. This can be done by setting the hooks |
| 588 | `comint-input-filter-functions', `comint-input-filter', `comint-input-sender' | 588 | `comint-input-filter-functions', `comint-input-filter', `comint-input-sender' |
| 589 | and `comint-get-old-input' to appropriate functions, and the variable | 589 | and `comint-get-old-input' to appropriate functions, and the variable |
| @@ -654,7 +654,7 @@ Entry to this mode runs the hooks on `comint-mode-hook'." | |||
| 654 | (set (make-local-variable 'next-line-add-newlines) nil)) | 654 | (set (make-local-variable 'next-line-add-newlines) nil)) |
| 655 | 655 | ||
| 656 | (defun comint-check-proc (buffer) | 656 | (defun comint-check-proc (buffer) |
| 657 | "Return t if there is a living process associated w/buffer BUFFER. | 657 | "Return non-nil if there is a living process associated w/buffer BUFFER. |
| 658 | Living means the status is `open', `run', or `stop'. | 658 | Living means the status is `open', `run', or `stop'. |
| 659 | BUFFER can be either a buffer or the name of one." | 659 | BUFFER can be either a buffer or the name of one." |
| 660 | (let ((proc (get-buffer-process buffer))) | 660 | (let ((proc (get-buffer-process buffer))) |
| @@ -667,7 +667,7 @@ If BUFFER is nil, it defaults to NAME surrounded by `*'s. | |||
| 667 | PROGRAM should be either a string denoting an executable program to create | 667 | PROGRAM should be either a string denoting an executable program to create |
| 668 | via `start-process', or a cons pair of the form (HOST . SERVICE) denoting a TCP | 668 | via `start-process', or a cons pair of the form (HOST . SERVICE) denoting a TCP |
| 669 | connection to be opened via `open-network-stream'. If there is already a | 669 | connection to be opened via `open-network-stream'. If there is already a |
| 670 | running process in that buffer, it is not restarted. Optional third arg | 670 | running process in that buffer, it is not restarted. Optional fourth arg |
| 671 | STARTFILE is the name of a file to send the contents of to the process. | 671 | STARTFILE is the name of a file to send the contents of to the process. |
| 672 | 672 | ||
| 673 | If PROGRAM is a string, any more args are arguments to PROGRAM." | 673 | If PROGRAM is a string, any more args are arguments to PROGRAM." |
| @@ -1547,8 +1547,12 @@ Similarly for Soar, Scheme, etc." | |||
| 1547 | nil comint-last-input-start comint-last-input-end | 1547 | nil comint-last-input-start comint-last-input-end |
| 1548 | nil comint-last-input-end | 1548 | nil comint-last-input-end |
| 1549 | (+ comint-last-input-end echo-len)))) | 1549 | (+ comint-last-input-end echo-len)))) |
| 1550 | (delete-region comint-last-input-end | 1550 | ;; Certain parts of the text to be deleted may have |
| 1551 | (+ comint-last-input-end echo-len))))) | 1551 | ;; been mistaken for prompts. We have to prevent |
| 1552 | ;; problems when `comint-prompt-read-only' is non-nil. | ||
| 1553 | (let ((inhibit-read-only t)) | ||
| 1554 | (delete-region comint-last-input-end | ||
| 1555 | (+ comint-last-input-end echo-len)))))) | ||
| 1552 | 1556 | ||
| 1553 | ;; This used to call comint-output-filter-functions, | 1557 | ;; This used to call comint-output-filter-functions, |
| 1554 | ;; but that scrolled the buffer in undesirable ways. | 1558 | ;; but that scrolled the buffer in undesirable ways. |
| @@ -1579,7 +1583,7 @@ See `comint-carriage-motion' for details.") | |||
| 1579 | 1583 | ||
| 1580 | (defun comint-snapshot-last-prompt () | 1584 | (defun comint-snapshot-last-prompt () |
| 1581 | "`snapshot' any current `comint-last-prompt-overlay'. | 1585 | "`snapshot' any current `comint-last-prompt-overlay'. |
| 1582 | freeze its attributes in place, even when more input comes a long | 1586 | Freeze its attributes in place, even when more input comes along |
| 1583 | and moves the prompt overlay." | 1587 | and moves the prompt overlay." |
| 1584 | (when comint-last-prompt-overlay | 1588 | (when comint-last-prompt-overlay |
| 1585 | (let ((inhibit-read-only t) | 1589 | (let ((inhibit-read-only t) |
| @@ -2385,7 +2389,7 @@ updated using `comint-update-fence', if necessary." | |||
| 2385 | "Compute the defaults for `load-file' and `compile-file' commands. | 2389 | "Compute the defaults for `load-file' and `compile-file' commands. |
| 2386 | 2390 | ||
| 2387 | PREVIOUS-DIR/FILE is a pair (directory . filename) from the last | 2391 | PREVIOUS-DIR/FILE is a pair (directory . filename) from the last |
| 2388 | source-file processing command. nil if there hasn't been one yet. | 2392 | source-file processing command, or nil if there hasn't been one yet. |
| 2389 | SOURCE-MODES is a list used to determine what buffers contain source | 2393 | SOURCE-MODES is a list used to determine what buffers contain source |
| 2390 | files: if the major mode of the buffer is in SOURCE-MODES, it's source. | 2394 | files: if the major mode of the buffer is in SOURCE-MODES, it's source. |
| 2391 | Typically, (lisp-mode) or (scheme-mode). | 2395 | Typically, (lisp-mode) or (scheme-mode). |