From ac7541822391d8be423c7e75e96588c2c6afdd6f Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 5 Jul 2001 22:39:08 +0000 Subject: [PATCH] Synch with Oort Gnus. --- lisp/ChangeLog | 16 ++++++++++++++++ lisp/mm-decode.el | 29 ++++++++--------------------- lisp/rfc2047.el | 5 ++++- 3 files changed, 28 insertions(+), 22 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 634daf3..b24d756 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,19 @@ +2001-07-05 Colin Walters + + * rfc2047.el (rfc2047-encode-message-header): Don't include the + header name when folding. + +2001-07-05 Colin Walters + + * 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 * nnimap.el (nnimap-importantize-dormant): New variable. diff --git a/lisp/mm-decode.el b/lisp/mm-decode.el index dcb6783..2a02fab 100644 --- a/lisp/mm-decode.el +++ b/lisp/mm-decode.el @@ -190,7 +190,10 @@ "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) @@ -745,7 +748,7 @@ external if displayed external." (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) @@ -753,19 +756,6 @@ external if displayed external." (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) @@ -773,8 +763,7 @@ external if displayed external." 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)) @@ -786,8 +775,7 @@ external if displayed external." 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)) @@ -799,8 +787,7 @@ external if displayed external." 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) diff --git a/lisp/rfc2047.el b/lisp/rfc2047.el index 0319794..e553f25 100644 --- a/lisp/rfc2047.el +++ b/lisp/rfc2047.el @@ -138,7 +138,10 @@ Should be called narrowed to the head of the message." (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) -- 1.7.10.4