emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 356413b: Don't remove undisplayers from inlined MIM


From: Katsumi Yamaoka
Subject: [Emacs-diffs] master 356413b: Don't remove undisplayers from inlined MIME parts (bugfix)
Date: Fri, 1 Sep 2017 03:26:03 -0400 (EDT)

branch: master
commit 356413bbf8333a0ace700bfbd7461b55ead63280
Author: Katsumi Yamaoka <address@hidden>
Commit: Katsumi Yamaoka <address@hidden>

    Don't remove undisplayers from inlined MIME parts (bugfix)
    
    * lisp/gnus/gnus-art.el (gnus-mime-buttonize-attachments-in-header):
    Don't remove undisplayers from inlined MIME parts (bugfix);
    Simplify criterion that finds attachments.
---
 lisp/gnus/gnus-art.el | 22 +++-------------------
 1 file changed, 3 insertions(+), 19 deletions(-)

diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index ce0ff2e..8fc5eba 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -6366,7 +6366,7 @@ buttons to be added to the header are only the ones that 
aren't inlined
 in the body.  Use `gnus-header-face-alist' to highlight buttons."
   (interactive (list t))
   (gnus-with-article-buffer
-    (let ((case-fold-search t) buttons handle type st)
+    (let ((case-fold-search t) buttons st)
       (save-excursion
        (save-restriction
          (widen)
@@ -6387,22 +6387,7 @@ in the body.  Use `gnus-header-face-alist' to highlight 
buttons."
            ;; Find buttons.
            (setq buttons nil)
            (dolist (button (gnus-article-mime-handles))
-             (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))))
+             (unless (mm-handle-undisplayer (cdr button))
                (push button buttons)))
            (when buttons
              ;; Add header buttons.
@@ -6413,8 +6398,7 @@ in the body.  Use `gnus-header-face-alist' to highlight 
buttons."
              (dolist (button (nreverse buttons))
                (setq st (point))
                (insert " ")
-               (mm-handle-set-undisplayer (setq handle (cdr button)) nil)
-               (gnus-insert-mime-button handle (car button))
+               (gnus-insert-mime-button (cdr button) (car button))
                (skip-chars-backward "\t\n ")
                (delete-region (point) (point-max))
                (when (> (current-column) (window-width))



reply via email to

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