summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2007-06-27 21:11:04 +0000
committerMichael Albinus <michael.albinus@gmx.de>2007-06-27 21:11:04 +0000
commit4a7258598668d2241d41423171e1ea398c3adbd4 (patch)
tree019965d76c4712df137b7f84c93a7526ffd74518 /lisp
parentd10434131fd52f631c2116bb059a56f40ff341f2 (diff)
* 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'.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/dired-aux.el17
-rw-r--r--lisp/net/ange-ftp.el8
-rw-r--r--lisp/wdired.el7
4 files changed, 19 insertions, 23 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index be7ee598371..a71e3897412 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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.
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 4bad556e015..8661df033ed 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -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)
-;; 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))))))
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index ec76279c642..898f9a23515 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -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)
;;; 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.
diff --git a/lisp/wdired.el b/lisp/wdired.el
index 4cc5a3c48c0..0c97b10ba5c 100644
--- a/lisp/wdired.el
+++ b/lisp/wdired.el
@@ -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 @@ 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"))))