Mercurial > hg > xemacs-beta
diff 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 |
line wrap: on
line diff
--- a/lisp/mule/mule-process.el Mon Aug 13 10:02:48 2007 +0200 +++ b/lisp/mule/mule-process.el Mon Aug 13 10:03:52 2007 +0200 @@ -72,7 +72,7 @@ (setq alist (cdr alist)) ))) (if (functionp ret) - (setq ret (funcall ret 'call-process filename)) + (setq ret (funcall ret 'call-process program)) ) (cond ((consp ret) (car ret)) ((find-coding-system ret) ret) @@ -116,7 +116,7 @@ (t (make-temp-name "/tmp/emacs"))))) (unwind-protect - (let (cs-r cd-w) + (let (cs-r cs-w) (let (ret) (catch 'found (let ((alist process-coding-system-alist) @@ -127,7 +127,7 @@ (setq alist (cdr alist)) ))) (if (functionp ret) - (setq ret (funcall ret 'call-process-region filename))) + (setq ret (funcall ret 'call-process-region program))) (cond ((consp ret) (setq cs-r (car ret) cs-w (cdr ret))) @@ -162,7 +162,7 @@ Remaining arguments are strings to give program as arguments. INCODE and OUTCODE specify the coding-system objects used in input/output from/to the process." - (let (cs-r cd-w) + (let (cs-r cs-w) (let (ret) (catch 'found (let ((alist process-coding-system-alist) @@ -173,7 +173,7 @@ (setq alist (cdr alist)) ))) (if (functionp ret) - (setq ret (funcall ret 'start-process filename))) + (setq ret (funcall ret 'start-process program))) (cond ((consp ret) (setq cs-r (car ret) cs-w (cdr ret))) @@ -216,18 +216,29 @@ Third arg is name of the host to connect to, or its IP address. Fourth arg SERVICE is name of the service desired, or an integer specifying a port number to connect to." - (let (cs-r cd-w) + (let (cs-r cs-w) (let (ret) (catch 'found (let ((alist network-coding-system-alist) - (case-fold-search (eq system-type 'vax-vms))) + (case-fold-search (eq system-type 'vax-vms)) + pattern) (while alist - (if (string-match (car (car alist)) program) - (throw 'found (setq ret (cdr (car alist))))) + (setq pattern (car (car alist))) + (and + (cond ((numberp pattern) + (and (numberp service) + (eq pattern service))) + ((stringp pattern) + (or (and (stringp service) + (string-match pattern service)) + (and (numberp service) + (string-match pattern + (number-to-string service)))))) + (throw 'found (setq ret (cdr (car alist))))) (setq alist (cdr alist)) ))) (if (functionp ret) - (setq ret (funcall ret 'open-network-stream filename))) + (setq ret (funcall ret 'open-network-stream service))) (cond ((consp ret) (setq cs-r (car ret) cs-w (cdr ret)))