]> git.eshelyaron.com Git - emacs.git/commitdiff
Make gnus-copy-file act like copy-file etc.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 11 Sep 2017 05:21:20 +0000 (22:21 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 11 Sep 2017 05:31:23 +0000 (22:31 -0700)
* 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
lisp/gnus/gnus-util.el

index 4da4c37a3c8ee094d935c01cf5acbeaac979de06..fc40a3a55e5c9699b2d58a5d95f8acff168376c6 100644 (file)
--- 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.
 
 \f
 * Lisp Changes in Emacs 26.1
index b509d8ad448b2ca826a1e57701848839e48253d2..93541f0db6702f14d898305b44e654b2247c2447 100644 (file)
@@ -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*")