]> code.delx.au - gnu-emacs/blobdiff - lisp/gnus/mm-decode.el
* message.el (message-setup-1): Prefer to save message-reply-buffer as a buffer.
[gnu-emacs] / lisp / gnus / mm-decode.el
index f9d8311c0c16f9b9f1e9a2e770698d6f024a168b..a511253dddb0c6ca868c362842218f556a568ce7 100644 (file)
@@ -1,7 +1,7 @@
 ;;; mm-decode.el --- Functions for decoding MIME things
 
 ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;;   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;;     MORIOKA Tomohiko <morioka@jaist.ac.jp>
 (eval-when-compile (require 'cl)
                   (require 'term))
 
-(eval-and-compile
-  (autoload 'mm-inline-partial "mm-partial")
-  (autoload 'mm-inline-external-body "mm-extern")
-  (autoload 'mm-extern-cache-contents "mm-extern")
-  (autoload 'mm-insert-inline "mm-view"))
+(autoload 'mm-inline-partial "mm-partial")
+(autoload 'mm-inline-external-body "mm-extern")
+(autoload 'mm-extern-cache-contents "mm-extern")
+(autoload 'mm-insert-inline "mm-view")
 
 (defvar gnus-current-window-configuration)
 
@@ -564,7 +563,9 @@ Postpone undisplaying of viewers for types in
                ctl (and ct (mail-header-parse-content-type ct))
                cte (mail-fetch-field "content-transfer-encoding")
                cd (mail-fetch-field "content-disposition")
-               description (mail-fetch-field "content-description")
+               ;; Newlines in description should be stripped so as
+               ;; not to break the MIME tag into two or more lines.
+               description (message-fetch-field "content-description")
                id (mail-fetch-field "content-id"))
          (unless from
            (setq from (mail-fetch-field "from")))
@@ -1295,7 +1296,8 @@ text/\\(\\sw+\\)\\(?:\;\\s-*charset=\\(.+?\\)\\)?[\"'][^>]*>" nil t)
   "Pipe HANDLE to a process."
   (let* ((name (mail-content-type-get (mm-handle-type handle) 'name))
         (command
-         (read-string "Shell command on MIME part: " mm-last-shell-command)))
+         (gnus-read-shell-command
+           "Shell command on MIME part: " mm-last-shell-command)))
     (mm-with-unibyte-buffer
       (mm-insert-part handle)
       (mm-add-meta-html-tag handle)
@@ -1437,6 +1439,8 @@ be determined."
            (intern type))
        :data (buffer-string)))))))
 
+(declare-function image-size "image.c" (spec &optional pixels frame))
+
 (defun mm-image-fit-p (handle)
   "Say whether the image in HANDLE will fit the current window."
   (let ((image (mm-get-image handle)))