X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=mime-edit.el;h=236daf08eb0a68760e7e10f904199228f1892437;hb=b7dcde6c17c2e496a4f3ac204129671dd8f994db;hp=89b4655fcbade603b1bf5c72e26c5f40aa295c87;hpb=ea9c73dc4063684e899f109b48fe449c4e886d6e;p=elisp%2Fsemi.git diff --git a/mime-edit.el b/mime-edit.el index 89b4655..236daf0 100644 --- a/mime-edit.el +++ b/mime-edit.el @@ -1,6 +1,6 @@ ;;; mime-edit.el --- Simple MIME Composer for GNU Emacs -;; Copyright (C) 1993,1994,1995,1996,1997,1998 Free Software Foundation, Inc. +;; Copyright (C) 1993,94,95,96,97,98,99 Free Software Foundation, Inc. ;; Author: UMEDA Masanobu ;; MORIOKA Tomohiko @@ -109,6 +109,7 @@ (require 'sendmail) (require 'mail-utils) (require 'mel) +(require 'semi-def) (require 'mime-view) (require 'signature) (require 'alist) @@ -120,13 +121,11 @@ (eval-and-compile (defconst mime-edit-version - (eval-when-compile - (concat - (mime-product-name mime-user-interface-product) " " - (mapconcat #'number-to-string - (mime-product-version mime-user-interface-product) ".") - " - \"" (mime-product-code-name mime-user-interface-product) "\""))) - ) + (concat + (mime-product-name mime-user-interface-product) " " + (mapconcat #'number-to-string + (mime-product-version mime-user-interface-product) ".") + " - \"" (mime-product-code-name mime-user-interface-product) "\""))) ;;; @ variables @@ -221,6 +220,7 @@ To insert a signature file automatically, call the function ("application" ("octet-stream" ("type" "" "tar" "shar")) ("postscript") + ("vnd.ms-powerpoint") ("x-kiss" ("x-cnf"))) ("image" ("gif") @@ -305,6 +305,11 @@ To insert a signature file automatically, call the function "base64" "attachment" (("filename" . file)) ) + ("\\.ppt$" ; MS Power Point + "application" "vnd.ms-powerpoint" nil + "base64" + "attachment" (("filename" . file)) + ) ("\\.pln$" "text" "plain" nil @@ -485,6 +490,7 @@ If encoding is nil, it is determined from its contents." (cn-big5 8 "base64") (big5 8 "base64") (shift_jis 8 "base64") + (tis-620 8 "base64") (iso-2022-jp-2 7 "base64") (iso-2022-int-1 7 "base64") )) @@ -1792,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 (concat "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)) @@ -2163,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)))))) ;;; @@ -2544,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 @@ -2559,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) @@ -2681,7 +2691,7 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n" "^Content-Transfer-Encoding:" limit t) (let ((beg (match-beginning 0)) (hbeg (match-end 0)) - (end (std11-field-end))) + (end (std11-field-end limit))) (setq encoding (downcase (eliminate-top-spaces @@ -2699,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)