Sync up with Pterodactyl Gnus v0.93.
[elisp/gnus.git-] / lisp / gnus-art.el
index e9b3827..20814fe 100644 (file)
@@ -841,13 +841,6 @@ See the manual for details."
   :group 'gnus-article-treat
   :type gnus-article-treat-custom)
 
-(defcustom gnus-treat-strip-blank-lines nil
-  "Strip all blank lines.
-Valid values are nil, t, `head', `last', an integer or a predicate.
-See the manual for details."
-  :group 'gnus-article-treat
-  :type gnus-article-treat-custom)
-
 (defcustom gnus-treat-overstrike t
   "Treat overstrike highlighting.
 Valid values are nil, t, `head', `last', an integer or a predicate.
@@ -958,7 +951,6 @@ See the manual for details."
      gnus-article-strip-leading-blank-lines)
     (gnus-treat-strip-multiple-blank-lines
      gnus-article-strip-multiple-blank-lines)
-    (gnus-treat-strip-blank-lines gnus-article-strip-blank-lines)
     (gnus-treat-overstrike gnus-article-treat-overstrike)
     (gnus-treat-buttonize-head gnus-article-add-buttons-to-head)
     (gnus-treat-display-smileys gnus-smiley-display)
@@ -3275,7 +3267,7 @@ Type any key: "
                      (gnus-treat-article
                       nil id
                       (1- (length gnus-article-mime-handles))
-                      (car (mm-handle-type handle))))))
+                      (mm-handle-media-type handle)))))
              (select-window window))))
       (goto-char point)
       (delete-region (gnus-point-at-bol) (progn (forward-line 1) (point)))
@@ -3296,7 +3288,7 @@ Type any key: "
             (mail-content-type-get (mm-handle-disposition handle)
                                    'filename)
             ""))
-       (gnus-tmp-type (car (mm-handle-type handle)))
+       (gnus-tmp-type (mm-handle-media-type handle))
        (gnus-tmp-description
         (mail-decode-encoded-word-string (or (mm-handle-description handle)
                                              "")))
@@ -3431,7 +3423,7 @@ Type any key: "
   (mapcar 'gnus-mime-display-part handles))
 
 (defun gnus-mime-display-single (handle)
-  (let ((type (car (mm-handle-type handle)))
+  (let ((type (mm-handle-media-type handle))
        (ignored gnus-ignored-mime-types)
        (not-attachment t)
        (move nil)
@@ -3450,8 +3442,7 @@ Type any key: "
                 (or (mm-inlined-p handle)
                     (mm-automatic-external-display-p type)))
            (setq display t)
-         (when (equal (car (split-string type "/"))
-                      "text")
+         (when (equal (mm-handle-media-supertype handle) "text")
            (setq text t)))
        (let ((id (1+ (length gnus-article-mime-handle-alist))))
          (push (cons id handle) gnus-article-mime-handle-alist)
@@ -3487,7 +3478,7 @@ Type any key: "
              (gnus-treat-article
               nil (length gnus-article-mime-handle-alist)
               (1- (length gnus-article-mime-handles))
-              (car (mm-handle-type handle))))))))))
+              (mm-handle-media-type handle)))))))))
 
 (defun gnus-unbuttonized-mime-type-p (type)
   "Say whether TYPE is to be unbuttonized."
@@ -3554,9 +3545,7 @@ Type any key: "
             (progn
               (insert (format "(%c) %-18s"
                               (if (equal handle preferred) ?* ? )
-                              (if (stringp (car handle))
-                                  (car handle)
-                                (car (mm-handle-type handle)))))
+                              (mm-handle-media-type handle)))
               (point))
             `(gnus-callback
               (lambda (handles)
@@ -3583,7 +3572,15 @@ Type any key: "
                  (mail-parse-ignored-charsets 
                   (save-excursion (set-buffer gnus-summary-buffer)
                                   gnus-newsgroup-ignored-charsets)))
-             (mm-display-part preferred)))
+             (mm-display-part preferred)
+             ;; Do highlighting.
+             (save-excursion
+               (save-restriction
+                 (narrow-to-region (car begend) (point-max))
+                 (gnus-treat-article
+                  nil (length gnus-article-mime-handle-alist)
+                  (1- (length gnus-article-mime-handles))
+                  (mm-handle-media-type handle))))))
          (goto-char (point-max))
          (setcdr begend (point-marker)))))
     (when ibegend
@@ -4099,8 +4096,6 @@ groups."
     (set-buffer gnus-article-buffer)
     (gnus-article-edit-mode)
     (funcall start-func)
-    ;;(gnus-article-delete-text-of-type 'annotation)
-    ;;(gnus-set-text-properties (point-min) (point-max) nil)
     (gnus-configure-windows 'edit-article)
     (setq gnus-article-edit-done-function exit-func)
     (setq gnus-prev-winconf winconf)