X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fcode-process.el;h=d96ecea05ae4316090ecd2f1d79e02c6900fd5e7;hb=ae726389a320379b8fb4b8956ffb2765f41184b4;hp=7174f9730d5ca707d8a1780a83226aade8d30d89;hpb=6883ee56ec887c2c48abe5b06b5e66aa74031910;p=chise%2Fxemacs-chise.git diff --git a/lisp/code-process.el b/lisp/code-process.el index 7174f97..d96ecea 100644 --- a/lisp/code-process.el +++ b/lisp/code-process.el @@ -30,6 +30,10 @@ ;;; Code: +(eval-when-compile + (defvar buffer-file-type) + (defvar binary-process-output)) + (defvar process-coding-system-alist nil "Alist to decide a coding system to use for a process I/O operation. The format is ((PATTERN . VAL) ...), @@ -66,7 +70,7 @@ If you quit, the process is killed with SIGINT, or SIGKILL if you (let (ret) (catch 'found (let ((alist process-coding-system-alist) - (case-fold-search (eq system-type 'vax-vms))) + (case-fold-search nil)) (while alist (if (string-match (car (car alist)) program) (throw 'found (setq ret (cdr (car alist)))) @@ -106,25 +110,16 @@ Otherwise waits for PROGRAM to terminate and returns a numeric exit status or a signal description string. If you quit, the process is first killed with SIGINT, then with SIGKILL if you quit again before the process exits." - (let ((temp (cond ((eq system-type 'vax-vms) - (make-temp-name "tmp:emacs")) - ((or (eq system-type 'ms-dos) - (eq system-type 'windows-nt)) - (make-temp-name - (concat (file-name-as-directory - (temp-directory)) - "em"))) - (t - (make-temp-name - (concat (file-name-as-directory - (temp-directory)) - "emacs")))))) + (let ((temp + (make-temp-name + (concat (file-name-as-directory (temp-directory)) + (if (memq system-type '(ms-dos windows-nt)) "em" "emacs"))))) (unwind-protect (let (cs-r cs-w) (let (ret) (catch 'found (let ((alist process-coding-system-alist) - (case-fold-search (eq system-type 'vax-vms))) + (case-fold-search nil)) (while alist (if (string-match (car (car alist)) program) (throw 'found (setq ret (cdr (car alist))))) @@ -142,16 +137,13 @@ you quit again before the process exits." (or coding-system-for-read cs-r)) (coding-system-for-write (or coding-system-for-write cs-w))) - (if (or (eq system-type 'ms-dos) - (eq system-type 'windows-nt)) + (if (memq system-type '(ms-dos windows-nt)) (let ((buffer-file-type binary-process-output)) (write-region start end temp nil 'silent)) (write-region start end temp nil 'silent)) (if deletep (delete-region start end)) (apply #'call-process program temp buffer displayp args))) - (condition-case () - (delete-file temp) - (file-error nil))))) + (ignore-file-errors (delete-file temp))))) (defun start-process (name buffer program &rest program-args) "Start a program in a subprocess. Return the process object for it. @@ -170,7 +162,7 @@ INCODE and OUTCODE specify the coding-system objects used in input/output (let (ret) (catch 'found (let ((alist process-coding-system-alist) - (case-fold-search (eq system-type 'vax-vms))) + (case-fold-search nil)) (while alist (if (string-match (car (car alist)) program) (throw 'found (setq ret (cdr (car alist))))) @@ -224,7 +216,7 @@ Fourth arg SERVICE is name of the service desired, or an integer (let (ret) (catch 'found (let ((alist network-coding-system-alist) - (case-fold-search (eq system-type 'vax-vms)) + (case-fold-search nil) pattern) (while alist (setq pattern (car (car alist)))