emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/dired-aux.el


From: Richard M . Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/dired-aux.el
Date: Thu, 19 May 2005 11:42:01 -0400

Index: emacs/lisp/dired-aux.el
diff -c emacs/lisp/dired-aux.el:1.130 emacs/lisp/dired-aux.el:1.131
*** emacs/lisp/dired-aux.el:1.130       Mon May 16 11:33:46 2005
--- emacs/lisp/dired-aux.el     Thu May 19 15:42:01 2005
***************
*** 1135,1157 ****
  
  (defun dired-copy-file-recursive (from to ok-flag &optional
                                       preserve-time top recursive)
!   (if (and recursive
!          (eq t (car (file-attributes from))) ; A directory, no symbolic link.
!          (or (eq recursive 'always)
!              (yes-or-no-p (format "Recursive copies of %s " from))))
!       (let ((files (directory-files from nil dired-re-no-dot)))
!       (if (eq recursive 'top) (setq recursive 'always)) ; Don't ask any more.
!       (if (file-exists-p to)
!           (or top (dired-handle-overwrite to))
!         (make-directory to))
!       (while files
!         (dired-copy-file-recursive
!          (expand-file-name (car files) from)
!          (expand-file-name (car files) to)
!          ok-flag preserve-time nil recursive)
!         (setq files (cdr files))))
!     (or top (dired-handle-overwrite to)) ; Just a file.
!     (copy-file from to ok-flag dired-copy-preserve-time)))
  
  ;;;###autoload
  (defun dired-rename-file (file newname ok-if-already-exists)
--- 1135,1163 ----
  
  (defun dired-copy-file-recursive (from to ok-flag &optional
                                       preserve-time top recursive)
!   (let ((attrs (file-attributes from)))
!     (if (and recursive
!            (eq t (car attrs))
!            (or (eq recursive 'always)
!                (yes-or-no-p (format "Recursive copies of %s " from))))
!       ;; This is a directory.
!       (let ((files (directory-files from nil dired-re-no-dot)))
!         (if (eq recursive 'top) (setq recursive 'always)) ; Don't ask any 
more.
!         (if (file-exists-p to)
!             (or top (dired-handle-overwrite to))
!           (make-directory to))
!         (while files
!           (dired-copy-file-recursive
!            (expand-file-name (car files) from)
!            (expand-file-name (car files) to)
!            ok-flag preserve-time nil recursive)
!           (setq files (cdr files))))
!       ;; Not a directory.
!       (or top (dired-handle-overwrite to))
!       (if (stringp (car attrs))
!         ;; It is a symlink
!         (make-symbolic-link (car attrs) to ok-flag)
!       (copy-file from to ok-flag dired-copy-preserve-time)))))
  
  ;;;###autoload
  (defun dired-rename-file (file newname ok-if-already-exists)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]