| 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))) |
|---|