Mercurial > hg > xemacs-beta
comparison lisp/mule/mule-process.el @ 207:e45d5e7c476e r20-4b2
Import from CVS: tag r20-4b2
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:03:52 +0200 |
parents | acd284d43ca1 |
children |
comparison
equal
deleted
inserted
replaced
206:d3e9274cbc4e | 207:e45d5e7c476e |
---|---|
70 (throw 'found (setq ret (cdr (car alist)))) | 70 (throw 'found (setq ret (cdr (car alist)))) |
71 ) | 71 ) |
72 (setq alist (cdr alist)) | 72 (setq alist (cdr alist)) |
73 ))) | 73 ))) |
74 (if (functionp ret) | 74 (if (functionp ret) |
75 (setq ret (funcall ret 'call-process filename)) | 75 (setq ret (funcall ret 'call-process program)) |
76 ) | 76 ) |
77 (cond ((consp ret) (car ret)) | 77 (cond ((consp ret) (car ret)) |
78 ((find-coding-system ret) ret) | 78 ((find-coding-system ret) ret) |
79 ) | 79 ) |
80 )))) | 80 )))) |
114 "")) | 114 "")) |
115 "em"))) | 115 "em"))) |
116 (t | 116 (t |
117 (make-temp-name "/tmp/emacs"))))) | 117 (make-temp-name "/tmp/emacs"))))) |
118 (unwind-protect | 118 (unwind-protect |
119 (let (cs-r cd-w) | 119 (let (cs-r cs-w) |
120 (let (ret) | 120 (let (ret) |
121 (catch 'found | 121 (catch 'found |
122 (let ((alist process-coding-system-alist) | 122 (let ((alist process-coding-system-alist) |
123 (case-fold-search (eq system-type 'vax-vms))) | 123 (case-fold-search (eq system-type 'vax-vms))) |
124 (while alist | 124 (while alist |
125 (if (string-match (car (car alist)) program) | 125 (if (string-match (car (car alist)) program) |
126 (throw 'found (setq ret (cdr (car alist))))) | 126 (throw 'found (setq ret (cdr (car alist))))) |
127 (setq alist (cdr alist)) | 127 (setq alist (cdr alist)) |
128 ))) | 128 ))) |
129 (if (functionp ret) | 129 (if (functionp ret) |
130 (setq ret (funcall ret 'call-process-region filename))) | 130 (setq ret (funcall ret 'call-process-region program))) |
131 (cond ((consp ret) | 131 (cond ((consp ret) |
132 (setq cs-r (car ret) | 132 (setq cs-r (car ret) |
133 cs-w (cdr ret))) | 133 cs-w (cdr ret))) |
134 ((find-coding-system ret) | 134 ((find-coding-system ret) |
135 (setq cs-r ret | 135 (setq cs-r ret |
160 with any buffer | 160 with any buffer |
161 Third arg is program file name. It is searched for as in the shell. | 161 Third arg is program file name. It is searched for as in the shell. |
162 Remaining arguments are strings to give program as arguments. | 162 Remaining arguments are strings to give program as arguments. |
163 INCODE and OUTCODE specify the coding-system objects used in input/output | 163 INCODE and OUTCODE specify the coding-system objects used in input/output |
164 from/to the process." | 164 from/to the process." |
165 (let (cs-r cd-w) | 165 (let (cs-r cs-w) |
166 (let (ret) | 166 (let (ret) |
167 (catch 'found | 167 (catch 'found |
168 (let ((alist process-coding-system-alist) | 168 (let ((alist process-coding-system-alist) |
169 (case-fold-search (eq system-type 'vax-vms))) | 169 (case-fold-search (eq system-type 'vax-vms))) |
170 (while alist | 170 (while alist |
171 (if (string-match (car (car alist)) program) | 171 (if (string-match (car (car alist)) program) |
172 (throw 'found (setq ret (cdr (car alist))))) | 172 (throw 'found (setq ret (cdr (car alist))))) |
173 (setq alist (cdr alist)) | 173 (setq alist (cdr alist)) |
174 ))) | 174 ))) |
175 (if (functionp ret) | 175 (if (functionp ret) |
176 (setq ret (funcall ret 'start-process filename))) | 176 (setq ret (funcall ret 'start-process program))) |
177 (cond ((consp ret) | 177 (cond ((consp ret) |
178 (setq cs-r (car ret) | 178 (setq cs-r (car ret) |
179 cs-w (cdr ret))) | 179 cs-w (cdr ret))) |
180 ((find-coding-system ret) | 180 ((find-coding-system ret) |
181 (setq cs-r ret | 181 (setq cs-r ret |
214 BUFFER may be also nil, meaning that this process is not associated | 214 BUFFER may be also nil, meaning that this process is not associated |
215 with any buffer | 215 with any buffer |
216 Third arg is name of the host to connect to, or its IP address. | 216 Third arg is name of the host to connect to, or its IP address. |
217 Fourth arg SERVICE is name of the service desired, or an integer | 217 Fourth arg SERVICE is name of the service desired, or an integer |
218 specifying a port number to connect to." | 218 specifying a port number to connect to." |
219 (let (cs-r cd-w) | 219 (let (cs-r cs-w) |
220 (let (ret) | 220 (let (ret) |
221 (catch 'found | 221 (catch 'found |
222 (let ((alist network-coding-system-alist) | 222 (let ((alist network-coding-system-alist) |
223 (case-fold-search (eq system-type 'vax-vms))) | 223 (case-fold-search (eq system-type 'vax-vms)) |
224 pattern) | |
224 (while alist | 225 (while alist |
225 (if (string-match (car (car alist)) program) | 226 (setq pattern (car (car alist))) |
226 (throw 'found (setq ret (cdr (car alist))))) | 227 (and |
228 (cond ((numberp pattern) | |
229 (and (numberp service) | |
230 (eq pattern service))) | |
231 ((stringp pattern) | |
232 (or (and (stringp service) | |
233 (string-match pattern service)) | |
234 (and (numberp service) | |
235 (string-match pattern | |
236 (number-to-string service)))))) | |
237 (throw 'found (setq ret (cdr (car alist))))) | |
227 (setq alist (cdr alist)) | 238 (setq alist (cdr alist)) |
228 ))) | 239 ))) |
229 (if (functionp ret) | 240 (if (functionp ret) |
230 (setq ret (funcall ret 'open-network-stream filename))) | 241 (setq ret (funcall ret 'open-network-stream service))) |
231 (cond ((consp ret) | 242 (cond ((consp ret) |
232 (setq cs-r (car ret) | 243 (setq cs-r (car ret) |
233 cs-w (cdr ret))) | 244 cs-w (cdr ret))) |
234 ((find-coding-system ret) | 245 ((find-coding-system ret) |
235 (setq cs-r ret | 246 (setq cs-r ret |