1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-17 10:06:13 +00:00

(comint-send-string, comint-send-region): Also accept a buffer, buffer-name,

or nil for PROCESS, for compatibility with process-send-string/region.
This commit is contained in:
Miles Bader 2000-12-15 14:09:22 +00:00
parent 4ea7fdcaa5
commit 9f62634527

View File

@ -1878,13 +1878,21 @@ This function could be in the list `comint-output-filter-functions'."
(defun comint-send-string (process string) (defun comint-send-string (process string)
"Like `process-send-string', but also does extra bookkeeping for comint mode." "Like `process-send-string', but also does extra bookkeeping for comint mode."
(with-current-buffer (process-buffer process) (if process
(with-current-buffer (if (processp process)
(process-buffer process)
(get-buffer process))
(comint-snapshot-last-prompt))
(comint-snapshot-last-prompt)) (comint-snapshot-last-prompt))
(process-send-string process string)) (process-send-string process string))
(defun comint-send-region (process start end) (defun comint-send-region (process start end)
"Like `process-send-region', but also does extra bookkeeping for comint mode." "Like `process-send-region', but also does extra bookkeeping for comint mode."
(with-current-buffer (process-buffer process) (if process
(with-current-buffer (if (processp process)
(process-buffer process)
(get-buffer process))
(comint-snapshot-last-prompt))
(comint-snapshot-last-prompt)) (comint-snapshot-last-prompt))
(process-send-region process start end)) (process-send-region process start end))