Add nnimap-user to nnimap.el.
[gnus] / lisp / gnus-art.el
index 20ffa8e..e03c787 100644 (file)
@@ -44,6 +44,7 @@
 (require 'wid-edit)
 (require 'mm-uu)
 (require 'message)
+(require 'mouse)
 
 (autoload 'gnus-msg-mail "gnus-msg" nil t)
 (autoload 'gnus-button-mailto "gnus-msg")
@@ -2810,14 +2811,11 @@ Return file name."
           ((equal (concat "<" cid ">") (mm-handle-id handle))
            (setq file
                  (expand-file-name
-                  (or (mail-content-type-get
-                       (mm-handle-disposition handle) 'filename)
-                      (mail-content-type-get
-                       (setq type (mm-handle-type handle)) 'name)
-                      (concat
-                       (make-temp-name "cid")
-                       (car (rassoc (car type) mailcap-mime-extensions))))
-                  directory))
+                   (or (mm-handle-filename handle)
+                       (concat
+                        (make-temp-name "cid")
+                        (car (rassoc (car (mm-handle-type handle)) mailcap-mime-extensions))))
+                   directory))
            (mm-save-part-to-file handle file)
            (throw 'found file))))))))
 
@@ -2834,10 +2832,7 @@ message header will be added to the bodies of the \"text/html\" parts."
            ((or (equal (car (setq type (mm-handle-type handle))) "text/html")
                 (and (equal (car type) "message/external-body")
                      (or header
-                         (setq file (or (mail-content-type-get type 'name)
-                                        (mail-content-type-get
-                                         (mm-handle-disposition handle)
-                                         'filename))))
+                         (setq file (mm-handle-filename handle)))
                      (or (mm-handle-cache handle)
                          (condition-case code
                              (progn (mm-extern-cache-contents handle) t)
@@ -3076,10 +3071,7 @@ images if any to the browser, and deletes them when exiting the group
 The `gnus-list-identifiers' variable specifies what to do."
   (interactive)
   (let ((inhibit-point-motion-hooks t)
-        (regexp (or (gnus-parameter-list-identifier gnus-newsgroup-name)
-                    (if (consp gnus-list-identifiers)
-                        (mapconcat 'identity gnus-list-identifiers " *\\|")
-                      gnus-list-identifiers)))
+        (regexp (gnus-group-get-list-identifiers gnus-newsgroup-name))
         (inhibit-read-only t))
     (when regexp
       (save-excursion
@@ -3415,7 +3407,11 @@ lines forward."
        (setq ended t)))))
 
 (defun article-treat-date ()
-  (article-date-ut gnus-article-date-headers t))
+  (article-date-ut (if (gnus-buffer-live-p gnus-summary-buffer)
+                      (with-current-buffer gnus-summary-buffer
+                        gnus-article-date-headers)
+                    gnus-article-date-headers)
+                  t))
 
 (defun article-date-ut (&optional type highlight date-position)
   "Convert DATE date to TYPE in the current article.
@@ -5045,14 +5041,11 @@ Deleting parts may malfunction or destroy the article; continue? "))
     (let* ((data (get-text-property (point) 'gnus-data))
           (id (get-text-property (point) 'gnus-part))
           (handles gnus-article-mime-handles)
-          (none "(none)")
           (description
            (let ((desc (mm-handle-description data)))
              (when desc
                (mail-decode-encoded-word-string desc))))
-          (filename
-           (or (mail-content-type-get (mm-handle-disposition data) 'filename)
-               none))
+          (filename (or (mm-handle-filename (mm-handle-disposition data)) "(none)"))
           (type (mm-handle-media-type data)))
       (unless data
        (error "No MIME part under point"))
@@ -5170,10 +5163,7 @@ are decompressed."
   (unless handle
     (setq handle (get-text-property (point) 'gnus-data)))
   (when handle
-    (let ((filename (or (mail-content-type-get (mm-handle-type handle)
-                                              'name)
-                       (mail-content-type-get (mm-handle-disposition handle)
-                                              'filename)))
+    (let ((filename (mm-handle-filename handle))
          contents dont-decode charset coding-system)
       (mm-with-unibyte-buffer
        (mm-insert-part handle)
@@ -5263,12 +5253,7 @@ Compressed files like .gz and .bz2 are decompressed."
        (mm-with-unibyte-buffer
          (mm-insert-part handle)
          (setq contents
-               (or (mm-decompress-buffer
-                    (or (mail-content-type-get (mm-handle-type handle)
-                                               'name)
-                        (mail-content-type-get (mm-handle-disposition handle)
-                                               'filename))
-                    nil t)
+               (or (mm-decompress-buffer (mm-handle-filename handle) nil t)
                    (buffer-string))))
        (cond
         ((not arg)
@@ -5673,8 +5658,7 @@ all parts."
 
 (defun gnus-insert-mime-button (handle gnus-tmp-id &optional displayed)
   (let ((gnus-tmp-name
-        (or (mail-content-type-get (mm-handle-type handle) 'name)
-            (mail-content-type-get (mm-handle-disposition handle) 'filename)
+        (or (mm-handle-filename handle)
             (mail-content-type-get (mm-handle-type handle) 'url)
             ""))
        (gnus-tmp-type (mm-handle-media-type handle))