]> code.delx.au - gnu-emacs/blobdiff - lisp/gnus/mm-decode.el
Merge from origin/emacs-25
[gnu-emacs] / lisp / gnus / mm-decode.el
index c861b9a8a29afaa228aab8026ef0e219f8bfcc68..f45337dc04222c60b0ae41766e252e773ace3c5c 100644 (file)
@@ -28,7 +28,6 @@
 (eval-when-compile (require 'cl))
 
 (autoload 'gnus-map-function "gnus-util")
-(autoload 'gnus-read-shell-command "gnus-util")
 
 (autoload 'mm-inline-partial "mm-partial")
 (autoload 'mm-inline-external-body "mm-extern")
@@ -150,7 +149,7 @@ nil    : use external viewer (default web browser)."
   :type 'boolean
   :group 'mime-display)
 
-(defcustom mm-html-blocked-images nil
+(defcustom mm-html-blocked-images ""
   "Regexp matching image URLs to be blocked, or nil meaning not to block.
 Note that cid images that are embedded in a message won't be blocked."
   :version "25.1"
@@ -383,12 +382,7 @@ enables you to choose manually one of two types those mails include."
   :type '(repeat regexp) ;; See `mm-preferred-alternative-precedence'.
   :group 'mime-display)
 
-(defcustom mm-tmp-directory
-  (if (fboundp 'temp-directory)
-      (temp-directory)
-    (if (boundp 'temporary-file-directory)
-       temporary-file-directory
-      "/tmp/"))
+(defcustom mm-tmp-directory temporary-file-directory
   "Where mm will store its temporary files."
   :type 'directory
   :group 'mime-display)
@@ -1353,12 +1347,12 @@ string if you do not like underscores."
 
 (defun mm-file-name-delete-control (filename)
   "Delete control characters from FILENAME."
-  (replace-regexp-in-string filename "[\x00-\x1f\x7f]" ""))
+  (replace-regexp-in-string "[\x00-\x1f\x7f]" "" filename))
 
 (defun mm-file-name-delete-gotchas (filename)
   "Delete shell gotchas from FILENAME."
-  (setq filename (replace-regexp-in-string filename "[<>|]" ""))
-  (replace-regexp-in-string filename "^[.-]+" ""))
+  (setq filename (replace-regexp-in-string "[<>|]" "" filename))
+  (replace-regexp-in-string "^[.-]+" "" filename))
 
 (defun mm-save-part (handle &optional prompt)
   "Write HANDLE to a file.
@@ -1451,7 +1445,7 @@ text/\\(\\sw+\\)\\(?:;\\s-*charset=\\([^\"'>]+\\)\\)?[^>]*>" nil t)
 Use CMD as the process."
   (let ((name (mail-content-type-get (mm-handle-type handle) 'name))
        (command (or cmd
-                    (gnus-read-shell-command
+                    (read-shell-command
                      "Shell command on MIME part: " mm-last-shell-command))))
     (mm-with-unibyte-buffer
       (mm-insert-part handle)
@@ -1588,8 +1582,7 @@ be determined."
 
 (defun mm-valid-image-format-p (format)
   "Say whether FORMAT can be displayed natively by Emacs."
-  (and (fboundp 'image-type-available-p)
-       (display-graphic-p)
+  (and (display-graphic-p)
        (image-type-available-p format)))
 
 (defun mm-valid-and-fit-image-p (format handle)
@@ -1788,8 +1781,7 @@ If RECURSIVE, search recursively."
 (defun mm-shr (handle)
   ;; Require since we bind its variables.
   (require 'shr)
-  (let ((shr-width (if (and (boundp 'shr-use-fonts)
-                           shr-use-fonts)
+  (let ((shr-width (if shr-use-fonts
                       nil
                     fill-column))
        (shr-content-function (lambda (id)
@@ -1814,7 +1806,7 @@ If RECURSIVE, search recursively."
                                                                 nil t))
                              (not (eq charset 'ascii)))
                         (decode-coding-string (buffer-string) charset)
-                      (mm-string-as-multibyte (buffer-string)))
+                      (string-as-multibyte (buffer-string)))
                   (erase-buffer)
                   (mm-enable-multibyte)))
         (goto-char (point-min))