"Remove encoded-word encoding from headers."
(let ((inhibit-point-motion-hooks t)
(rfc2047-default-charset gnus-newsgroup-default-charset)
+ (mm-charset-iso-8859-1-forced gnus-newsgroup-iso-8859-1-forced)
buffer-read-only)
(save-restriction
(message-narrow-to-head)
(set-window-point (get-buffer-window (current-buffer)) (point))
t))))))
+;;;###autoload
(defun gnus-article-prepare-display ()
"Make the current buffer look like a nice article."
;; Hooks for getting information from the article.
(gnus-run-hooks 'gnus-tmp-internal-hook)
(gnus-run-hooks 'gnus-article-prepare-hook)
(when gnus-display-mime-function
- (mm-setup-w3)
- (let ((url-standalone-mode (not gnus-plugged)))
- (funcall gnus-display-mime-function)))
+ (funcall gnus-display-mime-function))
;; Perform the article display hooks.
(gnus-run-hooks 'gnus-article-display-hook)))
"Interactively choose a view method for the MIME part under point."
(interactive)
(gnus-article-check-buffer)
- (mm-setup-w3)
- (let ((data (get-text-property (point) 'gnus-data))
- (url-standalone-mode (not gnus-plugged)))
+ (let ((data (get-text-property (point) 'gnus-data)))
(mm-interactively-view-part data)))
(defun gnus-mime-copy-part (&optional handle)
"Insert the MIME part under point into the current buffer."
(interactive "P") ; For compatibility reasons we are not using "z".
(gnus-article-check-buffer)
- (mm-setup-w3)
(let* ((data (get-text-property (point) 'gnus-data))
contents
- (url-standalone-mode (not gnus-plugged))
(b (point))
buffer-read-only)
(if (mm-handle-undisplayer data)
"View the MIME part under point with an external viewer."
(interactive)
(gnus-article-check-buffer)
- (mm-setup-w3)
(let* ((handle (or handle (get-text-property (point) 'gnus-data)))
- (url-standalone-mode (not gnus-plugged))
(mm-user-display-methods nil)
(mm-all-images-fit t)
(rfc2047-default-charset gnus-newsgroup-default-charset)
"View the MIME part under point with an internal viewer."
(interactive)
(gnus-article-check-buffer)
- (mm-setup-w3)
(let* ((handle (or handle (get-text-property (point) 'gnus-data)))
- (url-standalone-mode (not gnus-plugged))
(mm-user-display-methods '((".*" . inline)))
(mm-all-images-fit t)
(rfc2047-default-charset gnus-newsgroup-default-charset)
'filename)
""))
(gnus-tmp-type (car (mm-handle-type handle)))
- (gnus-tmp-description (or (mm-handle-description handle)
- ""))
+ (gnus-tmp-description
+ (mail-decode-encoded-word-string (or (mm-handle-description handle)
+ "")))
(gnus-tmp-dots
(if (if displayed (car displayed)
(mm-handle-displayed-p handle))
(defun gnus-widget-press-button (elems el)
(goto-char (widget-get elems :from))
- (mm-setup-w3)
- (let ((url-standalone-mode (not gnus-plugged)))
- (gnus-article-press-button)))
+ (gnus-article-press-button))
(defun gnus-display-mime (&optional ihandles)
"Insert MIME buttons in the buffer."
(delete-region (point) (point-max)))
(gnus-mime-display-part handles))))))
+(defvar gnus-mime-display-multipart-as-mixed nil)
+
(defun gnus-mime-display-part (handle)
(cond
;; Single part.
((not (stringp (car handle)))
(gnus-mime-display-single handle))
;; multipart/alternative
- ((equal (car handle) "multipart/alternative")
+ ((and (equal (car handle) "multipart/alternative")
+ (not gnus-mime-display-multipart-as-mixed))
(let ((id (1+ (length gnus-article-mime-handle-alist))))
(push (cons id handle) gnus-article-mime-handle-alist)
(gnus-mime-display-alternative (cdr handle) nil nil id)))
;; multipart/related
- ((equal (car handle) "multipart/related")
+ ((and (equal (car handle) "multipart/related")
+ (not gnus-mime-display-multipart-as-mixed))
;;;!!!We should find the start part, but we just default
;;;!!!to the first part.
(gnus-mime-display-part (cadr handle)))
(select-window win)))
(defvar gnus-decode-header-methods
- '(gnus-decode-with-mail-decode-encoded-word-region)
+ '(mail-decode-encoded-word-region)
"List of methods used to decode headers.
This variable is a list of FUNCTION or (REGEXP . FUNCTION). If item is
(defvar gnus-decode-header-methods-cache nil)
-(defun gnus-decode-with-mail-decode-encoded-word-region (start end)
- (let ((rfc2047-default-charset gnus-newsgroup-default-charset)
- (mm-charset-iso-8859-1-forced gnus-newsgroup-iso-8859-1-forced))
- (mail-decode-encoded-word-region start end)))
-
(defun gnus-multi-decode-header (start end)
"Apply the functions from `gnus-encoded-word-methods' that match."
(unless (and gnus-decode-header-methods-cache