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:
parent
4ea7fdcaa5
commit
9f62634527
@ -1878,13 +1878,21 @@ This function could be in the list `comint-output-filter-functions'."
|
||||
|
||||
(defun comint-send-string (process string)
|
||||
"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))
|
||||
(process-send-string process string))
|
||||
|
||||
(defun comint-send-region (process start end)
|
||||
"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))
|
||||
(process-send-region process start end))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user