`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.
+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
+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):
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))
(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."
(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)
(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)
;; "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
(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)