diff options
| author | Michael Albinus | 2007-06-27 21:11:04 +0000 |
|---|---|---|
| committer | Michael Albinus | 2007-06-27 21:11:04 +0000 |
| commit | 4a7258598668d2241d41423171e1ea398c3adbd4 (patch) | |
| tree | 019965d76c4712df137b7f84c93a7526ffd74518 | |
| parent | d10434131fd52f631c2116bb059a56f40ff341f2 (diff) | |
| download | emacs-4a7258598668d2241d41423171e1ea398c3adbd4.tar.gz emacs-4a7258598668d2241d41423171e1ea398c3adbd4.zip | |
* 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'.
| -rw-r--r-- | lisp/ChangeLog | 10 | ||||
| -rw-r--r-- | lisp/dired-aux.el | 17 | ||||
| -rw-r--r-- | lisp/net/ange-ftp.el | 8 | ||||
| -rw-r--r-- | lisp/wdired.el | 7 |
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 @@ | |||
| 1 | 2007-06-27 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * dired-aux.el: Remove `dired-call-process'. | ||
| 4 | (dired-check-process): Call `process-file'. | ||
| 5 | |||
| 6 | * wdired.el (wdired-do-perm-changes): Call `process-file'. | ||
| 7 | |||
| 8 | * net/ange-ftp.el (ange-ftp-dired-call-process): Reimplement it as | ||
| 9 | `ange-ftp-process-file'. | ||
| 10 | |||
| 1 | 2007-06-27 Stefan Monnier <monnier@iro.umontreal.ca> | 11 | 2007-06-27 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 12 | ||
| 3 | * emacs-lisp/cl.el: Use cl-loaddefs.el rather than manual autoloads. | 13 | * 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." | |||
| 582 | ;; Return nil for sake of nconc in dired-bunch-files. | 582 | ;; Return nil for sake of nconc in dired-bunch-files. |
| 583 | nil) | 583 | nil) |
| 584 | 584 | ||
| 585 | ;; In Emacs 19 this will return program's exit status. | ||
| 586 | ;; This is a separate function so that ange-ftp can redefine it. | ||
| 587 | (defun dired-call-process (program discard &rest arguments) | ||
| 588 | ; "Run PROGRAM with output to current buffer unless DISCARD is t. | ||
| 589 | ;Remaining arguments are strings passed as command arguments to PROGRAM." | ||
| 590 | ;; Look for a handler for default-directory in case it is a remote file name. | ||
| 591 | (let ((handler | ||
| 592 | (find-file-name-handler (directory-file-name default-directory) | ||
| 593 | 'dired-call-process))) | ||
| 594 | (if handler (apply handler 'dired-call-process | ||
| 595 | program discard arguments) | ||
| 596 | (apply 'call-process program nil (not discard) nil arguments)))) | ||
| 597 | 585 | ||
| 598 | (defun dired-check-process (msg program &rest arguments) | 586 | (defun dired-check-process (msg program &rest arguments) |
| 599 | ; "Display MSG while running PROGRAM, and check for output. | 587 | ; "Display MSG while running PROGRAM, and check for output. |
| @@ -610,8 +598,7 @@ can be produced by `dired-get-marked-files', for example." | |||
| 610 | (set-buffer err-buffer) | 598 | (set-buffer err-buffer) |
| 611 | (erase-buffer) | 599 | (erase-buffer) |
| 612 | (setq default-directory dir ; caller's default-directory | 600 | (setq default-directory dir ; caller's default-directory |
| 613 | err (not (eq 0 | 601 | err (not (eq 0 (apply 'process-file program nil t nil arguments)))) |
| 614 | (apply (function dired-call-process) program nil arguments)))) | ||
| 615 | (if err | 602 | (if err |
| 616 | (progn | 603 | (progn |
| 617 | (dired-log (concat program " " (prin1-to-string arguments) "\n")) | 604 | (dired-log (concat program " " (prin1-to-string arguments) "\n")) |
| @@ -1203,7 +1190,7 @@ Special value `always' suppresses confirmation." | |||
| 1203 | ;; It is a symlink | 1190 | ;; It is a symlink |
| 1204 | (make-symbolic-link (car attrs) to ok-flag) | 1191 | (make-symbolic-link (car attrs) to ok-flag) |
| 1205 | (copy-file from to ok-flag dired-copy-preserve-time)) | 1192 | (copy-file from to ok-flag dired-copy-preserve-time)) |
| 1206 | (file-date-error | 1193 | (file-date-error |
| 1207 | (push (dired-make-relative from) | 1194 | (push (dired-make-relative from) |
| 1208 | dired-create-files-failures) | 1195 | dired-create-files-failures) |
| 1209 | (dired-log "Can't set date on %s:\n%s\n" from err)))))) | 1196 | (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.") | |||
| 4360 | ;; This returns nil for any file name as argument. | 4360 | ;; This returns nil for any file name as argument. |
| 4361 | (put 'vc-registered 'ange-ftp 'null) | 4361 | (put 'vc-registered 'ange-ftp 'null) |
| 4362 | 4362 | ||
| 4363 | (put 'dired-call-process 'ange-ftp 'ange-ftp-dired-call-process) | 4363 | (put 'process-file 'ange-ftp 'ange-ftp-process-file) |
| 4364 | (put 'shell-command 'ange-ftp 'ange-ftp-shell-command) | 4364 | (put 'shell-command 'ange-ftp 'ange-ftp-shell-command) |
| 4365 | 4365 | ||
| 4366 | ;;; Define ways of getting at unmodified Emacs primitives, | 4366 | ;;; 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.") | |||
| 4523 | ;; default-directory is in ange-ftp syntax for remote file names. | 4523 | ;; default-directory is in ange-ftp syntax for remote file names. |
| 4524 | (ange-ftp-real-shell-command command output-buffer error-buffer)))) | 4524 | (ange-ftp-real-shell-command command output-buffer error-buffer)))) |
| 4525 | 4525 | ||
| 4526 | ;;; This is the handler for call-process. | 4526 | ;;; This is the handler for process-file. |
| 4527 | (defun ange-ftp-dired-call-process (program discard &rest arguments) | 4527 | (defun ange-ftp-process-file (program infile buffer display &rest arguments) |
| 4528 | ;; PROGRAM is always one of those below in the cond in dired.el. | 4528 | ;; PROGRAM is always one of those below in the cond in dired.el. |
| 4529 | ;; The ARGUMENTS are (nearly) always files. | 4529 | ;; The ARGUMENTS are (nearly) always files. |
| 4530 | (if (ange-ftp-ftp-name default-directory) | 4530 | (if (ange-ftp-ftp-name default-directory) |
| @@ -4544,7 +4544,7 @@ NEWNAME should be the name to give the new compressed or uncompressed file.") | |||
| 4544 | 1) | 4544 | 1) |
| 4545 | (error (insert (format "%s\n" (nth 1 oops))) | 4545 | (error (insert (format "%s\n" (nth 1 oops))) |
| 4546 | 1)) | 4546 | 1)) |
| 4547 | (apply 'call-process program nil (not discard) nil arguments))) | 4547 | (apply 'call-process program infile buffer display arguments))) |
| 4548 | 4548 | ||
| 4549 | ;; Handle an attempt to run chmod on a remote file | 4549 | ;; Handle an attempt to run chmod on a remote file |
| 4550 | ;; by using the ftp chmod command. | 4550 | ;; 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 @@ | |||
| 106 | (eval-when-compile (require 'cl)) | 106 | (eval-when-compile (require 'cl)) |
| 107 | (require 'dired) | 107 | (require 'dired) |
| 108 | (autoload 'dired-do-create-files-regexp "dired-aux") | 108 | (autoload 'dired-do-create-files-regexp "dired-aux") |
| 109 | (autoload 'dired-call-process "dired-aux") | ||
| 110 | 109 | ||
| 111 | (defgroup wdired nil | 110 | (defgroup wdired nil |
| 112 | "Mode to rename files by editing their names in dired buffers." | 111 | "Mode to rename files by editing their names in dired buffers." |
| @@ -684,7 +683,7 @@ Like original function but it skips read-only words." | |||
| 684 | (new-bit "-") | 683 | (new-bit "-") |
| 685 | (pos-prop (- (point) (- (current-column) wdired-col-perm)))) | 684 | (pos-prop (- (point) (- (current-column) wdired-col-perm)))) |
| 686 | (if (eq (char-after (point)) ?-) | 685 | (if (eq (char-after (point)) ?-) |
| 687 | (setq new-bit | 686 | (setq new-bit |
| 688 | (if (= (% (- (current-column) wdired-col-perm) 3) 0) "r" | 687 | (if (= (% (- (current-column) wdired-col-perm) 3) 0) "r" |
| 689 | (if (= (% (- (current-column) wdired-col-perm) 3) 1) "w" | 688 | (if (= (% (- (current-column) wdired-col-perm) 3) 1) "w" |
| 690 | "x")))) | 689 | "x")))) |
| @@ -744,8 +743,8 @@ Like original function but it skips read-only words." | |||
| 744 | (progn | 743 | (progn |
| 745 | (setq perm-tmp | 744 | (setq perm-tmp |
| 746 | (int-to-string (wdired-perms-to-number perms-new))) | 745 | (int-to-string (wdired-perms-to-number perms-new))) |
| 747 | (unless (equal 0 (dired-call-process dired-chmod-program | 746 | (unless (equal 0 (process-file dired-chmod-program |
| 748 | t perm-tmp filename)) | 747 | nil nil nil perm-tmp filename)) |
| 749 | (setq errors (1+ errors)) | 748 | (setq errors (1+ errors)) |
| 750 | (dired-log (concat dired-chmod-program " " perm-tmp | 749 | (dired-log (concat dired-chmod-program " " perm-tmp |
| 751 | " `" filename "' failed\n\n")))) | 750 | " `" filename "' failed\n\n")))) |