emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r117276: lisp/gnus/gnus-art.el (gnus-mime-buttonize-


From: Katsumi Yamaoka
Subject: [Emacs-diffs] trunk r117276: lisp/gnus/gnus-art.el (gnus-mime-buttonize-attachments-in-header): Improve criterion that finds parts to display
Date: Thu, 05 Jun 2014 22:43:42 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117276
revision-id: address@hidden
parent: address@hidden
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Thu 2014-06-05 22:43:36 +0000
message:
  lisp/gnus/gnus-art.el (gnus-mime-buttonize-attachments-in-header): Improve 
criterion that finds parts to display
modified:
  lisp/gnus/ChangeLog            changelog-20091113204419-o5vbwnq5f7feedwu-1433
  lisp/gnus/gnus-art.el          gnusart.el-20091113204419-o5vbwnq5f7feedwu-1108
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2014-06-05 04:31:36 +0000
+++ b/lisp/gnus/ChangeLog       2014-06-05 22:43:36 +0000
@@ -3,6 +3,8 @@
        * gnus-art.el (gnus-article-edit-part): Don't modifiy markers.
        (gnus-article-read-summary-keys):
        Don't bug out when there is no article in the summary buffer.
+       (gnus-mime-buttonize-attachments-in-header):
+       Improve criterion that finds parts to display.
 
        * gnus-art.el (gnus-mm-display-part):
        * mm-decode.el (mm-shr):

=== modified file 'lisp/gnus/gnus-art.el'
--- a/lisp/gnus/gnus-art.el     2014-06-05 04:31:36 +0000
+++ b/lisp/gnus/gnus-art.el     2014-06-05 22:43:36 +0000
@@ -4994,6 +4994,9 @@
                   ',gnus-newsgroup-ignored-charsets))
              (mbl mml-buffer-list))
          (setq mml-buffer-list nil)
+         ;; A new text must be inserted before deleting existing ones
+         ;; at the end so as not to move existing markers of which
+         ;; the insertion type is t.
          (delete-region
           (point-min)
           (prog1
@@ -6370,7 +6373,7 @@
                        (setcar handle (caar handle))))
                    flat)
              flat))))
-      (let ((case-fold-search t) buttons st handle)
+      (let ((case-fold-search t) buttons handle type st)
        (save-excursion
          (save-restriction
            (widen)
@@ -6390,14 +6393,24 @@
            (unless (and interactive buttons)
              ;; Find buttons.
              (setq buttons nil)
-             (dolist (handle (flattened-alist))
-               (when (and (not (stringp (cadr handle)))
-                          (or (equal (car (mm-handle-disposition
-                                           (cdr handle)))
-                                     "attachment")
-                              (not (and (mm-inlinable-p (cdr handle))
-                                        (mm-inlined-p (cdr handle))))))
-                 (push handle buttons)))
+             (dolist (button (flattened-alist))
+               (setq handle (cdr button)
+                     type (mm-handle-media-type handle))
+               (when (or (and (if (gnus-buffer-live-p gnus-summary-buffer)
+                                  (with-current-buffer gnus-summary-buffer
+                                    gnus-inhibit-images)
+                                gnus-inhibit-images)
+                              (string-match "\\`image/" type))
+                         (mm-inline-override-p handle)
+                         (and (mm-handle-disposition handle)
+                              (not (equal (car (mm-handle-disposition handle))
+                                          "inline"))
+                              (not (mm-attachment-override-p handle)))
+                         (not (mm-automatic-display-p handle))
+                         (not (or (and (mm-inlinable-p handle)
+                                       (mm-inlined-p handle))
+                                  (mm-automatic-external-display-p type))))
+                 (push button buttons)))
              (when buttons
                ;; Add header buttons.
                (article-goto-body)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]