Mercurial > emacs
changeset 100221:20326e3d1912
Require mail-parse.
(pmail-mime-show): Don't use removed function
pmail-header-hide-headers.
(pmail-mime): Use pmail-msgbeg and pmail-msgend instead of removed
pmail-desc-* functions.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Thu, 04 Dec 2008 22:49:10 +0000 |
parents | 29cfa704a5e2 |
children | f525c6b7ac64 |
files | lisp/mail/pmailmm.el |
diffstat | 1 files changed, 6 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/mail/pmailmm.el Thu Dec 04 22:48:57 2008 +0000 +++ b/lisp/mail/pmailmm.el Thu Dec 04 22:49:10 2008 +0000 @@ -37,8 +37,8 @@ ;;; Code: -;; For ... (require 'pmail) +(require 'mail-parse) ;;; Variables @@ -333,9 +333,7 @@ content-transfer-encoding content-disposition) ;; `point-min' returns the beginning and `end' points at the end - ;; of the headers. We're not using `pmail-header-get-header' - ;; because we must be able to handle the case of no headers - ;; existing in a part. In this case end is at point-min. + ;; of the headers. (goto-char (point-min)) ;; If we're showing a part without headers, then it will start ;; with a newline. @@ -372,11 +370,8 @@ ;; Hide headers and handle the part. (save-restriction (cond ((string= (car content-type) "message/rfc822") - (pmail-header-hide-headers) (narrow-to-region end (point-max))) - (show-headers - (pmail-header-hide-headers)) - (t + ((not show-headers) (delete-region (point-min) end))) (pmail-mime-handle content-type content-disposition content-transfer-encoding)))) @@ -385,12 +380,13 @@ "Copy buffer contents to a temporary buffer and handle MIME. This calls `pmail-mime-show' to do the real job." (interactive) + (pmail-swap-buffers-maybe) (let ((data (with-current-buffer pmail-buffer (save-restriction (widen) (buffer-substring - (pmail-desc-get-start pmail-current-message) - (pmail-desc-get-end pmail-current-message))))) + (pmail-msgbeg pmail-current-message) + (pmail-msgend pmail-current-message))))) (buf (get-buffer-create "*PMAIL*"))) (set-buffer buf) (let ((inhibit-read-only t))