diff lisp/dired-aux.el @ 90182:f042e7c0fe20

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-53 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 302-319) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 69) - Update from CVS
author Miles Bader <miles@gnu.org>
date Fri, 20 May 2005 04:22:05 +0000
parents 4da4a09e8b1b 95e7ae46e475
children b7da78284d4c
line wrap: on
line diff
--- a/lisp/dired-aux.el	Fri May 13 03:40:13 2005 +0000
+++ b/lisp/dired-aux.el	Fri May 20 04:22:05 2005 +0000
@@ -428,7 +428,7 @@
 	 (setq base-version-list	; there was a base version to which
 	       (assoc (substring fn 0 start-vn)	; this looks like a
 		      dired-file-version-alist))	; subversion
-	 (not (memq (string-to-int (substring fn (+ 2 start-vn)))
+	 (not (memq (string-to-number (substring fn (+ 2 start-vn)))
 		    base-version-list))	; this one doesn't make the cut
 	 (progn (beginning-of-line)
 		(delete-char 1)
@@ -760,7 +760,10 @@
   ;; The files used are determined by ARG (as in dired-get-marked-files).
   (or (eq dired-no-confirm t)
       (memq op-symbol dired-no-confirm)
-      (let ((files (dired-get-marked-files t arg))
+      ;; Pass t for DISTINGUISH-ONE-MARKED so that a single file which
+      ;; is marked pops up a window.  That will help the user see
+      ;; it isn't the current line file.
+      (let ((files (dired-get-marked-files t arg nil t))
 	    (string (if (eq op-symbol 'compress) "Compress or uncompress"
 		      (capitalize (symbol-name op-symbol)))))
 	(dired-mark-pop-up nil op-symbol files (function y-or-n-p)
@@ -1132,23 +1135,29 @@
 
 (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)))
+  (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)