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.
This commit is contained in:
Paul Eggert 2017-09-10 22:21:20 -07:00
parent 61946d991b
commit 739593d687
2 changed files with 2 additions and 5 deletions

View file

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

View 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*")