# HG changeset patch # User Michael Albinus # Date 1182978664 0 # Node ID 8e5203081e80380d1b5c49d1d52d79192f65ec0a # Parent d8b5a5f25e21d09608438c9e12a114377798bc7c * dired-aux.el: Remove `dired-call-process'. (dired-check-process): Call `process-file'. * wdired.el (wdired-do-perm-changes): Call `process-file'. * net/ange-ftp.el (ange-ftp-dired-call-process): Reimplement it as `ange-ftp-process-file'. diff -r d8b5a5f25e21 -r 8e5203081e80 lisp/ChangeLog --- a/lisp/ChangeLog Wed Jun 27 21:08:40 2007 +0000 +++ b/lisp/ChangeLog Wed Jun 27 21:11:04 2007 +0000 @@ -1,3 +1,13 @@ +2007-06-27 Michael Albinus + + * dired-aux.el: Remove `dired-call-process'. + (dired-check-process): Call `process-file'. + + * wdired.el (wdired-do-perm-changes): Call `process-file'. + + * net/ange-ftp.el (ange-ftp-dired-call-process): Reimplement it as + `ange-ftp-process-file'. + 2007-06-27 Stefan Monnier * emacs-lisp/cl.el: Use cl-loaddefs.el rather than manual autoloads. diff -r d8b5a5f25e21 -r 8e5203081e80 lisp/dired-aux.el --- a/lisp/dired-aux.el Wed Jun 27 21:08:40 2007 +0000 +++ b/lisp/dired-aux.el Wed Jun 27 21:11:04 2007 +0000 @@ -582,18 +582,6 @@ ;; Return nil for sake of nconc in dired-bunch-files. nil) -;; In Emacs 19 this will return program's exit status. -;; This is a separate function so that ange-ftp can redefine it. -(defun dired-call-process (program discard &rest arguments) -; "Run PROGRAM with output to current buffer unless DISCARD is t. -;Remaining arguments are strings passed as command arguments to PROGRAM." - ;; Look for a handler for default-directory in case it is a remote file name. - (let ((handler - (find-file-name-handler (directory-file-name default-directory) - 'dired-call-process))) - (if handler (apply handler 'dired-call-process - program discard arguments) - (apply 'call-process program nil (not discard) nil arguments)))) (defun dired-check-process (msg program &rest arguments) ; "Display MSG while running PROGRAM, and check for output. @@ -610,8 +598,7 @@ (set-buffer err-buffer) (erase-buffer) (setq default-directory dir ; caller's default-directory - err (not (eq 0 - (apply (function dired-call-process) program nil arguments)))) + err (not (eq 0 (apply 'process-file program nil t nil arguments)))) (if err (progn (dired-log (concat program " " (prin1-to-string arguments) "\n")) @@ -1203,7 +1190,7 @@ ;; It is a symlink (make-symbolic-link (car attrs) to ok-flag) (copy-file from to ok-flag dired-copy-preserve-time)) - (file-date-error + (file-date-error (push (dired-make-relative from) dired-create-files-failures) (dired-log "Can't set date on %s:\n%s\n" from err)))))) diff -r d8b5a5f25e21 -r 8e5203081e80 lisp/net/ange-ftp.el --- a/lisp/net/ange-ftp.el Wed Jun 27 21:08:40 2007 +0000 +++ b/lisp/net/ange-ftp.el Wed Jun 27 21:11:04 2007 +0000 @@ -4360,7 +4360,7 @@ ;; This returns nil for any file name as argument. (put 'vc-registered 'ange-ftp 'null) -(put 'dired-call-process 'ange-ftp 'ange-ftp-dired-call-process) +(put 'process-file 'ange-ftp 'ange-ftp-process-file) (put 'shell-command 'ange-ftp 'ange-ftp-shell-command) ;;; Define ways of getting at unmodified Emacs primitives, @@ -4523,8 +4523,8 @@ ;; default-directory is in ange-ftp syntax for remote file names. (ange-ftp-real-shell-command command output-buffer error-buffer)))) -;;; This is the handler for call-process. -(defun ange-ftp-dired-call-process (program discard &rest arguments) +;;; This is the handler for process-file. +(defun ange-ftp-process-file (program infile buffer display &rest arguments) ;; PROGRAM is always one of those below in the cond in dired.el. ;; The ARGUMENTS are (nearly) always files. (if (ange-ftp-ftp-name default-directory) @@ -4544,7 +4544,7 @@ 1) (error (insert (format "%s\n" (nth 1 oops))) 1)) - (apply 'call-process program nil (not discard) nil arguments))) + (apply 'call-process program infile buffer display arguments))) ;; Handle an attempt to run chmod on a remote file ;; by using the ftp chmod command. diff -r d8b5a5f25e21 -r 8e5203081e80 lisp/wdired.el --- a/lisp/wdired.el Wed Jun 27 21:08:40 2007 +0000 +++ b/lisp/wdired.el Wed Jun 27 21:11:04 2007 +0000 @@ -106,7 +106,6 @@ (eval-when-compile (require 'cl)) (require 'dired) (autoload 'dired-do-create-files-regexp "dired-aux") -(autoload 'dired-call-process "dired-aux") (defgroup wdired nil "Mode to rename files by editing their names in dired buffers." @@ -684,7 +683,7 @@ (new-bit "-") (pos-prop (- (point) (- (current-column) wdired-col-perm)))) (if (eq (char-after (point)) ?-) - (setq new-bit + (setq new-bit (if (= (% (- (current-column) wdired-col-perm) 3) 0) "r" (if (= (% (- (current-column) wdired-col-perm) 3) 1) "w" "x")))) @@ -744,8 +743,8 @@ (progn (setq perm-tmp (int-to-string (wdired-perms-to-number perms-new))) - (unless (equal 0 (dired-call-process dired-chmod-program - t perm-tmp filename)) + (unless (equal 0 (process-file dired-chmod-program + nil nil nil perm-tmp filename)) (setq errors (1+ errors)) (dired-log (concat dired-chmod-program " " perm-tmp " `" filename "' failed\n\n"))))