+2001-07-05 Colin Walters <walters@cis.ohio-state.edu>
+
+ * rfc2047.el (rfc2047-encode-message-header): Don't include the
+ header name when folding.
+
+2001-07-05 Colin Walters <walters@cis.ohio-state.edu>
+
+ * mm-decode.el (mm-inlined-types): Document relationship with
+ `mm-inline-media-tests'.
+ (mm-display-inline): Default to displaying as plain text if no
+ inlining handler is available.
+ (mm-inlinable-p): Remove.
+ (mm-inlined-p): Don't call `mm-inlinable-p'.
+ (mm-automatic-display-p): Ditto.
+ (mm-attachment-override-p): Ditto.
+
2001-07-04 Simon Josefsson <jas@extundo.com>
* nnimap.el (nnimap-importantize-dormant): New variable.
"message/partial" "message/external-body" "application/emacs-lisp"
"application/pgp-signature" "application/x-pkcs7-signature"
"application/pkcs7-signature")
- "List of media types that are to be displayed inline."
+ "List of media types that are to be displayed inline.
+See also `mm-inline-media-tests', which says how to display a media
+type inline. If no media test is defined, the default is to treat the
+type as plain text."
:type '(repeat string)
:group 'mime-display)
(defun mm-display-inline (handle)
(let* ((type (mm-handle-media-type handle))
(function (cadr (mm-assoc-string-match mm-inline-media-tests type))))
- (funcall function handle)
+ (funcall (or function #'mm-inline-text) handle)
(goto-char (point-min))))
(defun mm-assoc-string-match (alist type)
(when (string-match (car elem) type)
(return elem))))
-(defun mm-inlinable-p (handle)
- "Say whether HANDLE can be displayed inline."
- (let ((alist mm-inline-media-tests)
- (type (mm-handle-media-type handle))
- test)
- (while alist
- (when (string-match (caar alist) type)
- (setq test (caddar alist)
- alist nil)
- (setq test (funcall test handle)))
- (pop alist))
- test))
-
(defun mm-automatic-display-p (handle)
"Say whether the user wants HANDLE to be displayed automatically."
(let ((methods mm-automatic-display)
method result)
(while (setq method (pop methods))
(when (and (not (mm-inline-override-p handle))
- (string-match method type)
- (mm-inlinable-p handle))
+ (string-match method type))
(setq result t
methods nil)))
result))
method result)
(while (setq method (pop methods))
(when (and (not (mm-inline-override-p handle))
- (string-match method type)
- (mm-inlinable-p handle))
+ (string-match method type))
(setq result t
methods nil)))
result))
ty)
(catch 'found
(while (setq ty (pop types))
- (when (and (string-match ty type)
- (mm-inlinable-p handle))
+ (when (string-match ty type)
(throw 'found t))))))
(defun mm-inline-override-p (handle)
(point-min) (point-max)
(car message-posting-charset)))
;; No encoding necessary, but folding is nice
- (rfc2047-fold-region (point-min) (point-max)))
+ (rfc2047-fold-region (save-excursion
+ (goto-char (point-min))
+ (skip-chars-forward "^:")
+ (point)) (point-max)))
;; We found something that may perhaps be encoded.
(setq method nil
alist rfc2047-header-encoding-alist)