From: yamaoka Date: Tue, 5 Nov 2002 12:09:43 +0000 (+0000) Subject: * gnus-art.el (gnus-article-mime-edit-article-setup): Don't perform X-Git-Tag: t-gnus-6_15_10-00-quimby~105 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a94af60c548f0036f340c24c5adca0abd474c858;p=elisp%2Fgnus.git- * 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'. Synch with Oort Gnus. --- diff --git a/ChangeLog b/ChangeLog index 67929cc..f9378db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2002-11-05 Katsumi Yamaoka + + * 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 * lisp/dgnushack.el (dgnushack-bind-colon-keywords): Protect diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d41242f..a9915c1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,21 @@ +2002-11-05 Katsumi Yamaoka + + * 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 * gnus-group.el (gnus-group-delete-group): diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 12bac1f..5f154a3 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -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) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index de18b17..0401206 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -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) diff --git a/lisp/nndraft.el b/lisp/nndraft.el index 1ce7cac..e0fe811 100644 --- a/lisp/nndraft.el +++ b/lisp/nndraft.el @@ -107,12 +107,16 @@ ;; "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. @@ -121,15 +125,17 @@ ;; 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 diff --git a/lisp/nnmail.el b/lisp/nnmail.el index e8f1090..f6a556a 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -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)