]> git.eshelyaron.com Git - emacs.git/commitdiff
* dired-aux.el: Remove `dired-call-process'.
authorMichael Albinus <michael.albinus@gmx.de>
Wed, 27 Jun 2007 21:11:04 +0000 (21:11 +0000)
committerMichael Albinus <michael.albinus@gmx.de>
Wed, 27 Jun 2007 21:11:04 +0000 (21:11 +0000)
(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'.

lisp/ChangeLog
lisp/dired-aux.el
lisp/net/ange-ftp.el
lisp/wdired.el

index be7ee598371a48505e407a86f7668b5475046c0d..a71e3897412f3acf00c7aeb6aedb69759c48ecb5 100644 (file)
@@ -1,3 +1,13 @@
+2007-06-27  Michael Albinus  <michael.albinus@gmx.de>
+
+       * 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  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/cl.el: Use cl-loaddefs.el rather than manual autoloads.
index 4bad556e015e82882c80aa91df779d2106e102de..8661df033ed6c31ebb66c6541c7e1a571f402e59 100644 (file)
@@ -582,18 +582,6 @@ can be produced by `dired-get-marked-files', for example."
   ;; Return nil for sake of nconc in dired-bunch-files.
   nil)
 \f
-;; 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 @@ can be produced by `dired-get-marked-files', for example."
       (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 @@ Special value `always' suppresses confirmation."
              ;; 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))))))
index ec76279c642d812bef30a6b069c17ead4df1f7d4..898f9a235153bf491a5405c1936b23854cb6b1aa 100644 (file)
@@ -4360,7 +4360,7 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
 ;; 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)
 \f
 ;;; Define ways of getting at unmodified Emacs primitives,
@@ -4523,8 +4523,8 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
       ;; 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 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
                   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.
index 4cc5a3c48c0f604a52494f194114dbea954a1571..0c97b10ba5ccadd22bdf9e3754c34bde8f9d2aba 100644 (file)
 (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 @@ Like original function but it skips read-only words."
        (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 @@ Like original function but it skips read-only words."
             (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"))))