X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=mime-edit.el;h=236daf08eb0a68760e7e10f904199228f1892437;hb=b7dcde6c17c2e496a4f3ac204129671dd8f994db;hp=b0555cb3379e1140d1afc51072477718fb719df8;hpb=1b7351060f81fe6e8d2edf38e0d5612ceafc6fcf;p=elisp%2Fsemi.git diff --git a/mime-edit.el b/mime-edit.el index b0555cb..236daf0 100644 --- a/mime-edit.el +++ b/mime-edit.el @@ -109,14 +109,12 @@ (require 'sendmail) (require 'mail-utils) (require 'mel) +(require 'semi-def) (require 'mime-view) (require 'signature) (require 'alist) (require 'invisible) -;; Avoid byte-compile warning. -(defvar mc-default-scheme) - ;;; @ version ;;; @@ -1800,7 +1798,10 @@ Parameter must be '(PROMPT CHOICE1 (CHOISE2 ...))." (mime-edit-translate-region beg end boundary)) (ctype (car ret)) (encoding (nth 1 ret)) - pgp-boundary) + (pgp-boundary (concat (if (eq 'gpg pgp-version) + "gpg-" + "pgp-") + boundary))) (goto-char beg) (insert header) (insert (format "Content-Type: %s\n" ctype)) @@ -1812,12 +1813,6 @@ Parameter must be '(PROMPT CHOICE1 (CHOISE2 ...))." recipients (point-min) (point-max) from) (throw 'mime-edit-error 'pgp-error) ) - (setq pgp-boundary - (format "%s-%s" - (if (eq 'mc-scheme-gpg mc-default-scheme) - "gpg" - "pgp") - boundary)) (goto-char beg) (insert (format "--[[multipart/encrypted; boundary=\"%s\"; @@ -2177,8 +2172,7 @@ Content-Transfer-Encoding: 7bit (goto-char (point-min)) (while (re-search-forward regexp nil t) (delete-region (match-beginning 0) - (progn (forward-line 1) (point))) - ))) + (1+ (std11-field-end)))))) ;;; @@ -2558,6 +2552,7 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n" (buf-name (buffer-name)) (temp-buf-name (concat "*temp-article:" buf-name "*")) (buf (get-buffer temp-buf-name)) + (pgp-processing mime-edit-pgp-processing) ) (if buf (progn @@ -2573,6 +2568,7 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n" (setq mail-header-separator separator) (make-local-variable 'mime-edit-buffer) (setq mime-edit-buffer the-buf) + (setq mime-edit-pgp-processing pgp-processing) (run-hooks 'mime-edit-translate-hook) (mime-edit-translate-buffer) @@ -2713,9 +2709,15 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n" encoding nil) ))))))) (if (or encoded (not not-decode-text)) - (decode-mime-charset-region (point-min)(point-max) - (or charset default-mime-charset)) - ) + (progn + (save-excursion + (goto-char (point-min)) + (while (re-search-forward "\r\n" nil t) + (replace-match "\n") + )) + (decode-mime-charset-region (point-min)(point-max) + (or charset default-mime-charset)) + )) (let ((he (if (re-search-forward "^$" nil t) (match-end 0) (point-min)