Mercurial > hg > xemacs-beta
comparison src/process.c @ 408:501cfd01ee6d r21-2-34
Import from CVS: tag r21-2-34
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:18:11 +0200 |
parents | a86b2b5e0111 |
children | de805c49cfc1 |
comparison
equal
deleted
inserted
replaced
407:ed6218a7d4d3 | 408:501cfd01ee6d |
---|---|
1071 { | 1071 { |
1072 CHECK_PROCESS (proc); | 1072 CHECK_PROCESS (proc); |
1073 return XPROCESS (proc)->filter; | 1073 return XPROCESS (proc)->filter; |
1074 } | 1074 } |
1075 | 1075 |
1076 DEFUN ("process-send-region", Fprocess_send_region, 3, 3, 0, /* | 1076 DEFUN ("process-send-region", Fprocess_send_region, 3, 4, 0, /* |
1077 Send current contents of region as input to PROCESS. | 1077 Send current contents of the region between START and END as input to PROCESS. |
1078 PROCESS may be a process name or an actual process. | 1078 PROCESS may be a process name or an actual process. |
1079 Called from program, takes three arguments, PROCESS, START and END. | 1079 BUFFER specifies the buffer to look in; if nil, the current buffer is used. |
1080 If the region is more than 500 or so characters long, | 1080 If the region is more than 500 or so characters long, |
1081 it is sent in several bunches. This may happen even for shorter regions. | 1081 it is sent in several bunches. This may happen even for shorter regions. |
1082 Output from processes can arrive in between bunches. | 1082 Output from processes can arrive in between bunches. |
1083 */ | 1083 */ |
1084 (process, start, end)) | 1084 (process, start, end, buffer)) |
1085 { | 1085 { |
1086 /* This function can GC */ | 1086 /* This function can GC */ |
1087 Lisp_Object proc = get_process (process); | 1087 Lisp_Object proc = get_process (process); |
1088 Bufpos st, en; | 1088 Bufpos st, en; |
1089 | 1089 struct buffer *buf = decode_buffer (buffer, 0); |
1090 get_buffer_range_char (current_buffer, start, end, &st, &en, 0); | 1090 |
1091 | 1091 XSETBUFFER (buffer, buf); |
1092 send_process (proc, Fcurrent_buffer (), 0, | 1092 get_buffer_range_char (buf, start, end, &st, &en, 0); |
1093 st, en - st); | 1093 |
1094 send_process (proc, buffer, 0, st, en - st); | |
1094 return Qnil; | 1095 return Qnil; |
1095 } | 1096 } |
1096 | 1097 |
1097 DEFUN ("process-send-string", Fprocess_send_string, 2, 4, 0, /* | 1098 DEFUN ("process-send-string", Fprocess_send_string, 2, 4, 0, /* |
1098 Send PROCESS the contents of STRING as input. | 1099 Send PROCESS the contents of STRING as input. |