diff options
| author | Paul Eggert | 2017-09-10 22:21:20 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-09-10 22:31:23 -0700 |
| commit | 739593d68742f45e4e35dfc99573c47a5031b646 (patch) | |
| tree | 8fc669dfe918a353fa2c7f16d4ec5f31884e59a5 | |
| parent | 61946d991b663c9d35a50b758d0108c3cbf8027b (diff) | |
| download | emacs-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/NEWS | 4 | ||||
| -rw-r--r-- | lisp/gnus/gnus-util.el | 3 |
2 files changed, 2 insertions, 5 deletions
| @@ -1286,8 +1286,8 @@ call like (rename-file C D) that used the old, undocumented behavior | |||
| 1286 | can be written as (rename-file C (file-name-as-directory D)), a | 1286 | can be written as (rename-file C (file-name-as-directory D)), a |
| 1287 | formulation portable to both older and newer versions of Emacs. | 1287 | formulation portable to both older and newer versions of Emacs. |
| 1288 | Affected functions include add-name-to-file, copy-directory, | 1288 | Affected functions include add-name-to-file, copy-directory, |
| 1289 | copy-file, format-write-file, make-symbolic-link, rename-file, and | 1289 | copy-file, format-write-file, gnus-copy-file, make-symbolic-link, |
| 1290 | write-file. | 1290 | rename-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*") |