From f2f8abeaf79965522316593f67b15565819087cb Mon Sep 17 00:00:00 2001 From: yamaoka Date: Fri, 16 Dec 2005 11:58:17 +0000 Subject: [PATCH] Synch to No Gnus 200512161157. --- lisp/ChangeLog | 19 +++++++++++++++++++ lisp/gnus-art.el | 28 ++++++++++++++++++++++------ lisp/gnus-msg.el | 1 + lisp/mm-decode.el | 12 ++++++------ 4 files changed, 48 insertions(+), 12 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fdf2d6a..e1ab882 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,22 @@ +2005-12-16 Katsumi Yamaoka + + * gnus-art.el (gnus-article-delete-text-of-type): Enable it to + remove MIME buttons associated with multipart/alternative parts. + (gnus-mime-display-alternative): Tag buttons using `article-type' + text property. + + * gnus-msg.el (gnus-copy-article-buffer): Remove MIME buttons + associated with multipart/alternative parts. + + * gnus-art.el (gnus-signature-separator): Fix custom type. + + * mm-decode.el (mm-inlined-types): Fix custom type. + (mm-keep-viewer-alive-types): Ditto. + (mm-automatic-display): Ditto. + (mm-attachment-override-types): Ditto. + (mm-inline-override-types): Ditto. + (mm-automatic-external-display): Ditto. + 2005-12-15 Reiner Steib * spam-report.el (spam-report-user-mail-address) diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index b6da97c..5d43915 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -243,7 +243,9 @@ only of boring text. Boring text is controlled by This can also be a list of regexps. In that case, it will be checked from head to tail looking for a separator. Searches will be done from the end of the buffer." - :type '(repeat string) + :type '(choice :format "%{%t%}: %[Value Menu%]\n%v" + (regexp) + (repeat :tag "List of regexp" regexp)) :group 'gnus-article-signature) (defcustom gnus-signature-limit nil @@ -1767,10 +1769,24 @@ Initialized from `text-mode-syntax-table.") "Delete text of TYPE in the current buffer." (save-excursion (let ((b (point-min))) - (while (setq b (text-property-any b (point-max) 'article-type type)) - (delete-region - b (or (text-property-not-all b (point-max) 'article-type type) - (point-max))))))) + (if (eq type 'multipart) + ;; Remove MIME buttons associated with multipart/alternative parts. + (progn + (goto-char b) + (while (if (get-text-property (point) 'gnus-part) + (setq b (point)) + (when (setq b (next-single-property-change (point) + 'gnus-part)) + (goto-char b) + t)) + (end-of-line) + (skip-chars-forward "\n") + (when (eq (get-text-property b 'article-type) 'multipart) + (delete-region b (point))))) + (while (setq b (text-property-any b (point-max) 'article-type type)) + (delete-region + b (or (text-property-not-all b (point-max) 'article-type type) + (point-max)))))))) (defun gnus-article-delete-invisible-text () "Delete all invisible text in the current buffer." @@ -5452,7 +5468,7 @@ If displaying \"text/html\" is discouraged \(see ,gnus-mouse-face-prop ,gnus-article-mouse-face face ,gnus-article-button-face gnus-part ,id - gnus-data ,handle)) + article-type multipart)) (widget-convert-button 'link from (point) :action 'gnus-widget-press-button :button-keymap gnus-widget-button-keymap) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 40610bf..f3d8e7e 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -922,6 +922,7 @@ header line with the old Message-ID." (when (featurep 'smiley-mule) (smiley-encode-buffer))) (gnus-article-delete-text-of-type 'annotation) + (gnus-article-delete-text-of-type 'multipart) (gnus-remove-text-with-property 'gnus-prev) (gnus-remove-text-with-property 'gnus-next) (gnus-remove-text-with-property 'gnus-decoration) diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index fe5f282..68a44d1 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -283,7 +283,7 @@ before the external MIME handler is invoked." "List of media types that are to be displayed inline. See also `mm-inline-media-tests', which says how to display a media type inline." - :type '(repeat string) + :type '(repeat regexp) :group 'mime-display) (defcustom mm-keep-viewer-alive-types @@ -292,7 +292,7 @@ type inline." "List of media types for which the external viewer will not be killed when selecting a different article." :version "22.1" - :type '(repeat string) + :type '(repeat regexp) :group 'mime-display) (defcustom mm-automatic-display @@ -304,7 +304,7 @@ when selecting a different article." "application/pkcs7-signature" "application/x-pkcs7-mime" "application/pkcs7-mime") "A list of MIME types to be displayed automatically." - :type '(repeat string) + :type '(repeat regexp) :group 'mime-display) (defcustom mm-attachment-override-types '("text/x-vcard" @@ -313,17 +313,17 @@ when selecting a different article." "application/pkcs7-signature" "application/x-pkcs7-signature") "Types to have \"attachment\" ignored if they can be displayed inline." - :type '(repeat string) + :type '(repeat regexp) :group 'mime-display) (defcustom mm-inline-override-types nil "Types to be treated as attachments even if they can be displayed inline." - :type '(repeat string) + :type '(repeat regexp) :group 'mime-display) (defcustom mm-automatic-external-display nil "List of MIME type regexps that will be displayed externally automatically." - :type '(repeat string) + :type '(repeat regexp) :group 'mime-display) (defcustom mm-discouraged-alternatives nil -- 1.7.10.4