* gnus-art.el (gnus-article-mime-edit-article-setup): Don't perform
authoryamaoka <yamaoka>
Tue, 5 Nov 2002 12:09:43 +0000 (12:09 +0000)
committeryamaoka <yamaoka>
Tue, 5 Nov 2002 12:09:43 +0000 (12:09 +0000)
 `mime-edit-again' for a delayed or a queued article.
(gnus-article-mime-edit-done): Bind `inhibit-read-only' to t while running
 `gnus-article-edit-done'.

Synch with Oort Gnus.

ChangeLog
lisp/ChangeLog
lisp/gnus-art.el
lisp/gnus-sum.el
lisp/nndraft.el
lisp/nnmail.el

index 67929cc..f9378db 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2002-11-05  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * lisp/gnus-art.el (gnus-article-mime-edit-article-setup): Don't
+       perform `mime-edit-again' for a delayed or a queued article.
+       (gnus-article-mime-edit-done): Bind `inhibit-read-only' to t while
+       running `gnus-article-edit-done'.
+
 2002-10-30  TSUCHIYA Masatoshi  <tsuchiya@namazu.org>
 
        * lisp/dgnushack.el (dgnushack-bind-colon-keywords): Protect
index d41242f..a9915c1 100644 (file)
@@ -1,3 +1,21 @@
+2002-11-05  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el (gnus-article-encrypt-body): Inhibit encrypting of
+       a delayed or a queued article as well as a draft.
+
+       * gnus-sum.el (gnus-summary-edit-article): Inhibit editing of a
+       delayed or a queued article in the raw format; treat a delayed
+       article as a raw article as well as a draft.
+       (gnus-summary-setup-default-charset): Clear gnus-newsgroup-charset
+       for the delayed group.
+
+       * nndraft.el (nndraft-request-article): Ignore auto save files for
+       a delayed or a queued article; don't bother to decode a queued
+       article; don't bind nnmail-file-coding-system for a queued article.
+
+       * nnmail.el (nnmail-split-fancy-with-parent): Ignore the delayed
+       and the queue group.
+
 2002-11-04  Jesper Harder  <harder@ifa.au.dk>
 
        * gnus-group.el (gnus-group-delete-group):
index 12bac1f..5f154a3 100644 (file)
@@ -5741,18 +5741,22 @@ after replacing with the original article."
                             gnus-article-edit-mode-map)
   (erase-buffer)
   (insert-buffer-substring gnus-original-article-buffer)
-  (let ((ofn (symbol-function 'mime-edit-decode-single-part-in-buffer)))
-    (fset 'mime-edit-decode-single-part-in-buffer
-         (lambda (&rest args)
-           (if (let ((content-type (car args)))
-                 (and (eq 'message (mime-content-type-primary-type
-                                    content-type))
-                      (eq 'rfc822 (mime-content-type-subtype content-type))))
-               (setcar (cdr args) 'not-decode-text))
-           (apply ofn args)))
-    (unwind-protect
-       (mime-edit-again)
-      (fset 'mime-edit-decode-single-part-in-buffer ofn)))
+  (unless (member (with-current-buffer gnus-summary-buffer
+                   gnus-newsgroup-name)
+                 '("nndraft:delayed" "nndraft:drafts"))
+    (let ((ofn (symbol-function 'mime-edit-decode-single-part-in-buffer)))
+      (fset 'mime-edit-decode-single-part-in-buffer
+           (lambda (&rest args)
+             (if (let ((content-type (car args)))
+                   (and (eq 'message (mime-content-type-primary-type
+                                      content-type))
+                        (eq 'rfc822 (mime-content-type-subtype
+                                     content-type))))
+                 (setcar (cdr args) 'not-decode-text))
+             (apply ofn args)))
+      (unwind-protect
+         (mime-edit-again)
+       (fset 'mime-edit-decode-single-part-in-buffer ofn))))
   (when (featurep 'font-lock)
     (set (make-local-variable 'font-lock-defaults)
         '(message-font-lock-keywords t))
@@ -5769,7 +5773,8 @@ after replacing with the original article."
   (when (featurep 'font-lock)
     (setq font-lock-defaults nil)
     (font-lock-mode -1))
-  (gnus-article-edit-done arg))
+  (let ((inhibit-read-only t))
+    (gnus-article-edit-done arg)))
 
 (defun gnus-article-mime-edit-exit ()
   "Exit the article MIME editing without updating."
@@ -6737,10 +6742,11 @@ For example:
   (let ((func (cdr (assoc protocol gnus-article-encrypt-protocol-alist))))
     (unless func
       (error (format "Can't find the encrypt protocol %s" protocol)))
-    (if (equal gnus-newsgroup-name "nndraft:drafts")
-       (error "Can't encrypt the article in group nndraft:drafts"))
-    (if (equal gnus-newsgroup-name "nndraft:queue")
-       (error "Don't encrypt the article in group nndraft:queue"))
+    (if (member gnus-newsgroup-name '("nndraft:delayed"
+                                     "nndraft:drafts"
+                                     "nndraft:queue"))
+       (error "Can't encrypt the article in group %s"
+              gnus-newsgroup-name))
     (gnus-summary-iterate n
       (save-excursion
        (set-buffer gnus-summary-buffer)
index de18b17..0401206 100644 (file)
@@ -11139,7 +11139,7 @@ UNREAD is a sorted list."
 
 (defun gnus-summary-setup-default-charset ()
   "Setup newsgroup default charset."
-  (if (equal gnus-newsgroup-name "nndraft:drafts")
+  (if (member gnus-newsgroup-name '("nndraft:delayed" "nndraft:drafts"))
       (progn
        (setq gnus-newsgroup-charset nil)
        (make-local-variable 'default-mime-charset)
index 1ce7cac..e0fe811 100644 (file)
     ;; "real" file.
     (let* ((file (nndraft-article-filename id))
           (auto (nndraft-auto-save-file-name file))
-          (newest (if (file-newer-than-file-p file auto) file auto))
+          (newest (if (or (member group '("drafts" "delayed"))
+                          (file-newer-than-file-p file auto))
+                      file
+                    auto))
           (nntp-server-buffer (or buffer nntp-server-buffer))
           ;; The default value for `message-draft-coding-system' was
           ;; `emacs-mule' for Emacs in the past, and the existing draft
           ;; files may have been saved using that coding-system.
           (maybe-emacs-mule-p (and (not (featurep 'xemacs))
+                                   (not (equal "queue" group))
                                    (static-if (boundp 'MULE)
                                        (eq message-draft-coding-system
                                            ;; The present default value.
                                          ;; The present default value.
                                          'iso-2022-7bit)))))
       (when (and (file-exists-p newest)
-                (let ((nnmail-file-coding-system
-                       (if (file-newer-than-file-p file auto)
-                           (if (member group '("drafts" "delayed"))
-                               (if maybe-emacs-mule-p
-                                   nnheader-text-coding-system
-                                 message-draft-coding-system)
-                             nnheader-text-coding-system)
-                         nnheader-auto-save-coding-system)))
-                  (nnmail-find-file newest)))
+                (if (equal "queue" group)
+                    (nnmail-find-file newest)
+                  (let ((nnmail-file-coding-system
+                         (if (file-newer-than-file-p file auto)
+                             (if (member group '("drafts" "delayed"))
+                                 (if maybe-emacs-mule-p
+                                     nnheader-text-coding-system
+                                   message-draft-coding-system)
+                               nnheader-text-coding-system)
+                           nnheader-auto-save-coding-system)))
+                    (nnmail-find-file newest))))
        (save-excursion
          (set-buffer nntp-server-buffer)
          (when maybe-emacs-mule-p
index e8f1090..f6a556a 100644 (file)
@@ -1551,7 +1551,7 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
        (nnmail-cache-open))
       (mapcar (lambda (x)
                (setq res (or (nnmail-cache-fetch-group x) res))
-               (when (or (string= "drafts" res)
+               (when (or (member res '("delayed" "drafts" "queue"))
                          (and regexp res (string-match regexp res)))
                  (setq res nil)))
              references)