Revert last change in message.el.
authorShengHuo ZHU <zsh@cs.rochester.edu>
Wed, 7 Mar 2001 18:20:06 +0000 (18:20 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Wed, 7 Mar 2001 18:20:06 +0000 (18:20 +0000)
2001-03-07 13:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>

* nndraft.el (nndraft-request-group): Restore auto save files if
the original files do not exist.

lisp/ChangeLog
lisp/lpath.el
lisp/message.el
lisp/nndraft.el

index 5a9bdae..7685bf2 100644 (file)
@@ -1,6 +1,7 @@
-2001-03-07 12:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+2001-03-07 13:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * message.el (message-set-auto-save-file-name): Save a copy.
+       * nndraft.el (nndraft-request-group): Restore auto save files if
+       the original files do not exist.
 
 2001-03-07 11:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
index aa47b9f..867de91 100644 (file)
 (defun nnkiboze-score-file (a)
 )
 
-;; This is just to shut up the byte-compiler.
-(defalias 'nndraft-request-group 'ignore)
-
 (provide 'lpath)
index 8403321..1afa719 100644 (file)
@@ -3849,8 +3849,6 @@ than 988 characters long, and if they are not, trim them until they are."
       (setq buffer-file-name (expand-file-name "*message*"
                                               message-auto-save-directory))
       (setq buffer-auto-save-file-name (make-auto-save-file-name)))
-    (set-buffer-modified-p t) ;; Force Gnus to save a copy in drafts.
-    (save-buffer) 
     (clear-visited-file-modtime)
     (setq buffer-file-coding-system message-draft-coding-system)))
 
index 861a122..1214406 100644 (file)
     (clear-visited-file-modtime)
     article))
 
+(deffoo nndraft-request-group (group &optional server dont-check)
+  (nndraft-possibly-change-group group)
+  (unless dont-check
+    (let* ((pathname (nnmail-group-pathname group nndraft-directory))
+          (file-name-coding-system nnmail-pathname-coding-system)
+          dir file)
+      (nnheader-re-read-dir pathname)
+      (setq dir (mapcar (lambda (name) (string-to-int (substring name 1)))
+                       (directory-files pathname nil "^#[0-9]+#$" t)))
+      (dolist (n dir)
+       (unless (file-exists-p
+                (setq file (expand-file-name (int-to-string n) pathname)))
+         (rename-file (let ((buffer-file-name file))
+                        (make-auto-save-file-name)) file)))))
+  (nnoo-parent-function 'nndraft
+                       'nnmh-request-group
+                       (list group server dont-check)))
+
 (deffoo nndraft-request-expire-articles (articles group &optional server force)
   (nndraft-possibly-change-group group)
   (let* ((nnmh-allow-delete-final t)