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 73425710455..fe0987e2076 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -228,7 +228,8 @@ This variable is buffer-local." | |||
| 228 | :group 'comint) | 228 | :group 'comint) |
| 229 | 229 | ||
| 230 | (defface comint-highlight-prompt | 230 | (defface comint-highlight-prompt |
| 231 | '((((background dark)) (:foreground "cyan")) | 231 | '((((min-colors 88) (background dark)) (:foreground "cyan1")) |
| 232 | (((background dark)) (:foreground "cyan")) | ||
| 232 | (t (:foreground "dark blue"))) | 233 | (t (:foreground "dark blue"))) |
| 233 | "Face to use to highlight prompts." | 234 | "Face to use to highlight prompts." |
| 234 | :group 'comint) | 235 | :group 'comint) |
| @@ -1387,14 +1388,15 @@ Ignore duplicates if `comint-input-ignoredups' is non-nil." | |||
| 1387 | cmd)))) | 1388 | cmd)))) |
| 1388 | (ring-insert comint-input-ring cmd))) | 1389 | (ring-insert comint-input-ring cmd))) |
| 1389 | 1390 | ||
| 1390 | (defun comint-send-input (&optional no-newline) | 1391 | (defun comint-send-input (&optional no-newline artificial) |
| 1391 | "Send input to process. | 1392 | "Send input to process. |
| 1392 | After the process output mark, sends all text from the process mark to | 1393 | After the process output mark, sends all text from the process mark to |
| 1393 | point as input to the process. Before the process output mark, calls | 1394 | point as input to the process. Before the process output mark, calls |
| 1394 | value of variable `comint-get-old-input' to retrieve old input, copies | 1395 | value of variable `comint-get-old-input' to retrieve old input, copies |
| 1395 | it to the process mark, and sends it. A terminal newline is also | 1396 | it to the process mark, and sends it. |
| 1396 | inserted into the buffer and sent to the process unless NO-NEWLINE is | 1397 | |
| 1397 | non-nil. | 1398 | This command also sends and inserts a final newline, unless |
| 1399 | NO-NEWLINE is non-nil. | ||
| 1398 | 1400 | ||
| 1399 | Any history reference may be expanded depending on the value of the variable | 1401 | Any history reference may be expanded depending on the value of the variable |
| 1400 | `comint-input-autoexpand'. The list of function names contained in the value | 1402 | `comint-input-autoexpand'. The list of function names contained in the value |
| @@ -1408,6 +1410,8 @@ end of line before sending the input. | |||
| 1408 | After the input has been sent, if `comint-process-echoes' is non-nil, | 1410 | After the input has been sent, if `comint-process-echoes' is non-nil, |
| 1409 | then `comint-send-input' waits to see if the process outputs a string | 1411 | then `comint-send-input' waits to see if the process outputs a string |
| 1410 | matching the input, and if so, deletes that part of the output. | 1412 | matching the input, and if so, deletes that part of the output. |
| 1413 | If ARTIFICIAL is non-nil, it inhibits such deletion. | ||
| 1414 | Callers sending input not from the user should use ARTIFICIAL = t. | ||
| 1411 | 1415 | ||
| 1412 | The values of `comint-get-old-input', `comint-input-filter-functions', and | 1416 | The values of `comint-get-old-input', `comint-input-filter-functions', and |
| 1413 | `comint-input-filter' are chosen according to the command interpreter running | 1417 | `comint-input-filter' are chosen according to the command interpreter running |
| @@ -1512,7 +1516,7 @@ Similarly for Soar, Scheme, etc." | |||
| 1512 | (funcall comint-input-sender proc input)) | 1516 | (funcall comint-input-sender proc input)) |
| 1513 | 1517 | ||
| 1514 | ;; Optionally delete echoed input (after checking it). | 1518 | ;; Optionally delete echoed input (after checking it). |
| 1515 | (when comint-process-echoes | 1519 | (when (and comint-process-echoes (not artificial)) |
| 1516 | (let ((echo-len (- comint-last-input-end | 1520 | (let ((echo-len (- comint-last-input-end |
| 1517 | comint-last-input-start))) | 1521 | comint-last-input-start))) |
| 1518 | ;; Wait for all input to be echoed: | 1522 | ;; Wait for all input to be echoed: |
| @@ -2087,7 +2091,7 @@ Useful if you accidentally suspend the top-level process." | |||
| 2087 | This means mark it as if it had been sent as input, without sending it." | 2091 | This means mark it as if it had been sent as input, without sending it." |
| 2088 | (let ((comint-input-sender 'ignore) | 2092 | (let ((comint-input-sender 'ignore) |
| 2089 | (comint-input-filter-functions nil)) | 2093 | (comint-input-filter-functions nil)) |
| 2090 | (comint-send-input t)) | 2094 | (comint-send-input t t)) |
| 2091 | (end-of-line) | 2095 | (end-of-line) |
| 2092 | (let ((pos (point)) | 2096 | (let ((pos (point)) |
| 2093 | (marker (process-mark (get-buffer-process (current-buffer))))) | 2097 | (marker (process-mark (get-buffer-process (current-buffer))))) |
| @@ -2114,7 +2118,7 @@ Sends an EOF only if point is at the end of the buffer and there is no input." | |||
| 2114 | (defun comint-send-eof () | 2118 | (defun comint-send-eof () |
| 2115 | "Send an EOF to the current buffer's process." | 2119 | "Send an EOF to the current buffer's process." |
| 2116 | (interactive) | 2120 | (interactive) |
| 2117 | (comint-send-input t) | 2121 | (comint-send-input t t) |
| 2118 | (process-send-eof)) | 2122 | (process-send-eof)) |
| 2119 | 2123 | ||
| 2120 | 2124 | ||