Show
Ignore:
Timestamp:
2006年07月29日 07時48分34秒 (2 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/dired-aux.el

    r4091 r4131  
    746746           ;;; Try gzip; if we don't have that, use compress. 
    747747           (condition-case nil 
    748                (if (not (dired-check-process (concat "Compressing " file) 
    749                                              "gzip" "-f" file)) 
    750                    (let ((out-name 
    751                           (if (file-exists-p (concat file ".gz")) 
    752                               (concat file ".gz") 
    753                             (concat file ".z")))) 
    754                      ;; Rename the compressed file to NEWNAME 
    755                      ;; if it hasn't got that name already. 
    756                      (if (and newname (not (equal newname out-name))) 
    757                          (progn 
    758                            (rename-file out-name newname t) 
    759                            newname) 
    760                        out-name))) 
     748               (let ((out-name (concat file ".gz"))) 
     749                 (and (or (not (file-exists-p out-name)) 
     750                          (y-or-n-p 
     751                           (format "File %s already exists.  Really compress? " 
     752                                   out-name))) 
     753                      (not (dired-check-process (concat "Compressing " file) 
     754                                                "gzip" "-f" file)) 
     755                      (or (file-exists-p out-name) 
     756                          (setq out-name (concat file ".z"))) 
     757                      ;; Rename the compressed file to NEWNAME 
     758                      ;; if it hasn't got that name already. 
     759                      (if (and newname (not (equal newname out-name))) 
     760                          (progn 
     761                            (rename-file out-name newname t) 
     762                            newname) 
     763                        out-name))) 
    761764             (file-error 
    762765              (if (not (dired-check-process (concat "Compressing " file)