[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 739593d 3/5: Make gnus-copy-file act like copy-file
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master 739593d 3/5: Make gnus-copy-file act like copy-file etc. |
Date: |
Mon, 11 Sep 2017 01:31:30 -0400 (EDT) |
branch: master
commit 739593d68742f45e4e35dfc99573c47a5031b646
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
Make gnus-copy-file act like copy-file etc.
* etc/NEWS: Mention this.
* lisp/gnus/gnus-util.el (gnus-copy-file): Treat the destination
as special only if it is a directory name.
---
etc/NEWS | 4 ++--
lisp/gnus/gnus-util.el | 3 ---
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index 4da4c37..fc40a3a 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1286,8 +1286,8 @@ call like (rename-file C D) that used the old,
undocumented behavior
can be written as (rename-file C (file-name-as-directory D)), a
formulation portable to both older and newer versions of Emacs.
Affected functions include add-name-to-file, copy-directory,
-copy-file, format-write-file, make-symbolic-link, rename-file, and
-write-file.
+copy-file, format-write-file, gnus-copy-file, make-symbolic-link,
+rename-file, and write-file.
* Lisp Changes in Emacs 26.1
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index b509d8a..93541f0 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -594,9 +594,6 @@ If N, return the Nth ancestor instead."
(read-file-name "Copy file to: " default-directory)))
(unless to
(setq to (read-file-name "Copy file to: " default-directory)))
- (when (file-directory-p to)
- (setq to (concat (file-name-as-directory to)
- (file-name-nondirectory file))))
(copy-file file to))
(defvar gnus-work-buffer " *gnus work*")