X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fnndraft.el;h=487ffc17253d6e622f432bf47cebb2f497e6427c;hb=d86ab5078b7ef13ba72403bbbe216e0ac48a9d2f;hp=4e095157e53cdd0430ba73c86317c627dcb4f57d;hpb=30d9f23f0291edcefeca1958befadb992d2982b5;p=elisp%2Fgnus.git- diff --git a/lisp/nndraft.el b/lisp/nndraft.el index 4e09515..487ffc1 100644 --- a/lisp/nndraft.el +++ b/lisp/nndraft.el @@ -25,13 +25,14 @@ ;;; Code: +(eval-when-compile (require 'cl)) + (require 'nnheader) (require 'nnmail) (require 'gnus-start) (require 'nnmh) (require 'nnoo) (eval-when-compile - (require 'cl) ;; This is just to shut up the byte-compiler. (fset 'nndraft-request-group 'ignore)) @@ -109,11 +110,7 @@ (newest (if (file-newer-than-file-p file auto) file auto)) (nntp-server-buffer (or buffer nntp-server-buffer))) (when (and (file-exists-p newest) - (let ((nnmail-file-coding-system - (if (file-newer-than-file-p file auto) - 'binary - message-draft-coding-system))) - (nnmail-find-file newest))) + (nnmail-find-file newest)) (save-excursion (set-buffer nntp-server-buffer) (goto-char (point-min)) @@ -138,8 +135,9 @@ info (gnus-update-read-articles (gnus-group-prefixed-name group '(nndraft "")) (nndraft-articles) t)) - (let (marks) - (when (setq marks (nth 3 info)) + (let ((marks (nth 3 info))) + (when marks + ;; Nix out all marks except the `unsend'-able article marks. (setcar (nthcdr 3 info) (if (assq 'unsend marks) (list (assq 'unsend marks)) @@ -153,7 +151,7 @@ (nndraft-possibly-change-group group) (let ((gnus-verbose-backends nil) (buf (current-buffer)) - article file) + article file) (with-temp-buffer (insert-buffer-substring buf) (setq article (nndraft-request-accept-article @@ -177,7 +175,14 @@ (let ((auto (nndraft-auto-save-file-name (nndraft-article-filename article)))) (when (file-exists-p auto) - (funcall nnmail-delete-file-function auto))))) + (funcall nnmail-delete-file-function auto))) + (dolist (backup + (let ((kept-new-versions 1) + (kept-old-versions 0)) + (find-backup-file-name + (nndraft-article-filename article)))) + (when (file-exists-p backup) + (funcall nnmail-delete-file-function backup))))) res)) (deffoo nndraft-request-accept-article (group &optional server last noinsert)