(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")
: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"
: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)
(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.
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)
(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)
(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)
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))