Function: process-send-region
process-send-region is a function defined in process.c.
Signature
(process-send-region PROCESS START END)
Documentation
Send current contents of region as input to PROCESS.
PROCESS may be a process, a buffer, the name of a process or buffer, or nil, indicating the current buffer's process. Called from program, takes three arguments, PROCESS, START and END. If the region is larger than the input buffer of the process (the length of which depends on the process connection type and the operating system), it is sent in several bunches. This may happen even for shorter regions. Output from processes can arrive in between bunches.
If PROCESS is a non-blocking network process that hasn't been fully set up yet, this function will block until socket setup has completed.
Aliases
Source Code
// Defined in /usr/src/emacs/src/process.c
{
Lisp_Object proc = get_process (process);
ptrdiff_t start_byte, end_byte;
validate_region (&start, &end);
start_byte = CHAR_TO_BYTE (XFIXNUM (start));
end_byte = CHAR_TO_BYTE (XFIXNUM (end));
if (XFIXNUM (start) < GPT && XFIXNUM (end) > GPT)
move_gap_both (XFIXNUM (start), start_byte);
if (NETCONN_P (proc))
wait_while_connecting (proc);
send_process (proc, (char *) BYTE_POS_ADDR (start_byte),
end_byte - start_byte, Fcurrent_buffer ());
return Qnil;
}