aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2017-09-10 22:21:20 -0700
committerPaul Eggert2017-09-10 22:31:23 -0700
commit739593d68742f45e4e35dfc99573c47a5031b646 (patch)
tree8fc669dfe918a353fa2c7f16d4ec5f31884e59a5
parent61946d991b663c9d35a50b758d0108c3cbf8027b (diff)
downloademacs-739593d68742f45e4e35dfc99573c47a5031b646.tar.gz
emacs-739593d68742f45e4e35dfc99573c47a5031b646.zip
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.
-rw-r--r--etc/NEWS4
-rw-r--r--lisp/gnus/gnus-util.el3
2 files changed, 2 insertions, 5 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 4da4c37a3c8..fc40a3a55e5 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1286,8 +1286,8 @@ call like (rename-file C D) that used the old, undocumented behavior
1286can be written as (rename-file C (file-name-as-directory D)), a 1286can be written as (rename-file C (file-name-as-directory D)), a
1287formulation portable to both older and newer versions of Emacs. 1287formulation portable to both older and newer versions of Emacs.
1288Affected functions include add-name-to-file, copy-directory, 1288Affected functions include add-name-to-file, copy-directory,
1289copy-file, format-write-file, make-symbolic-link, rename-file, and 1289copy-file, format-write-file, gnus-copy-file, make-symbolic-link,
1290write-file. 1290rename-file, and write-file.
1291 1291
1292 1292
1293* Lisp Changes in Emacs 26.1 1293* Lisp Changes in Emacs 26.1
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index b509d8ad448..93541f0db67 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -594,9 +594,6 @@ If N, return the Nth ancestor instead."
594 (read-file-name "Copy file to: " default-directory))) 594 (read-file-name "Copy file to: " default-directory)))
595 (unless to 595 (unless to
596 (setq to (read-file-name "Copy file to: " default-directory))) 596 (setq to (read-file-name "Copy file to: " default-directory)))
597 (when (file-directory-p to)
598 (setq to (concat (file-name-as-directory to)
599 (file-name-nondirectory file))))
600 (copy-file file to)) 597 (copy-file file to))
601 598
602(defvar gnus-work-buffer " *gnus work*") 599(defvar gnus-work-buffer " *gnus work*")