X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=mime-edit.el;h=4b3c7047e0ef82442daa75660a6d097ff953ec81;hb=cfd4673f6df4e165aeb7337627d97c07a1445f0b;hp=42e792ea445edac0d5c26a4af8a94bf0675e1b8b;hpb=c48b1114e037fe7450cfa5d78e33aa7807ba5959;p=elisp%2Fsemi.git diff --git a/mime-edit.el b/mime-edit.el index 42e792e..4b3c704 100644 --- a/mime-edit.el +++ b/mime-edit.el @@ -1,6 +1,7 @@ ;;; mime-edit.el --- Simple MIME Composer for GNU Emacs -;; Copyright (C) 1993,94,95,96,97,98,99,2000 Free Software Foundation, Inc. +;; Copyright (C) 1993,94,95,96,97,98,99,2000,01,02,03 +;; Free Software Foundation, Inc. ;; Author: UMEDA Masanobu ;; MORIOKA Tomohiko @@ -235,6 +236,9 @@ To insert a signature file automatically, call the function ("application" ("octet-stream" ("type" "" "tar" "shar")) ("postscript") + ("pdf") + ("msword") + ("vnd.ms-excel") ("vnd.ms-powerpoint") ("x-kiss" ("x-cnf"))) ("image" @@ -320,6 +324,11 @@ To insert a signature file automatically, call the function "base64" "attachment" (("filename" . file)) ) + ("\\.xls$" ; MS Excel + "application" "vnd.ms-excel" nil + "base64" + "attachment" (("filename" . file)) + ) ("\\.ppt$" ; MS Power Point "application" "vnd.ms-powerpoint" nil "base64" @@ -333,7 +342,12 @@ To insert a signature file automatically, call the function ) ("\\.ps$" "application" "postscript" nil - "quoted-printable" + "base64" + "attachment" (("filename" . file)) + ) + ("\\.pdf$" + "application" "pdf" nil + "base64" "attachment" (("filename" . file)) ) @@ -497,6 +511,8 @@ If encoding is nil, it is determined from its contents." (iso-8859-7 8 "quoted-printable") (iso-8859-8 8 "quoted-printable") (iso-8859-9 8 "quoted-printable") + (iso-8859-14 8 "quoted-printable") + (iso-8859-15 8 "quoted-printable") (iso-2022-jp 7 "base64") (iso-2022-jp-3 7 "base64") (iso-2022-kr 7 "base64") @@ -650,7 +666,10 @@ If it is not specified for a major-mode, (if (fboundp 'apel-version) (concat (apel-version) " ")) (if (featurep 'xemacs) - (concat (cond ((featurep 'utf-2000) + (concat (cond ((and (featurep 'chise) + (boundp 'xemacs-chise-version)) + (concat "CHISE-MULE/" xemacs-chise-version)) + ((featurep 'utf-2000) (concat "UTF-2000-MULE/" utf-2000-version)) ((featurep 'mule) "MULE")) " XEmacs" @@ -1057,6 +1076,7 @@ User customizable variables (not documented all of them): paragraph-separate)) (run-hooks 'mime-edit-mode-hook) (message + "%s" (substitute-command-keys "Type \\[mime-edit-exit] to exit MIME mode, and type \\[mime-edit-help] to get help.")) )) @@ -1600,7 +1620,7 @@ Optional DELIMITER specifies parameter delimiter (';' by default)." (defun mime-prompt-for-parameter (parameter) "Ask for PARAMETER. -Parameter must be '(PROMPT CHOICE1 (CHOISE2 ...))." +Parameter must be '(PROMPT CHOICE1 (CHOICE2...))." (let* ((prompt (car parameter)) (choices (mapcar (function (lambda (e) @@ -2295,7 +2315,13 @@ Content-Description: S/MIME Encrypted Message][base64]]\n") (narrow-to-region beg (mime-edit-content-end)) (goto-char beg) (while (re-search-forward "\\(\\=\\|[^\r]\\)\n" nil t) - (replace-match "\\1\r\n")))) + ;; In a certain period, `replace-match' with "\\N" + ;; converted 8-bit characters into multibyte string, + ;; but it has been fixed at 2004-01-15. + ;;(replace-match "\\1\r\n")))) + (backward-char 1) + (insert "\r") + (forward-char 1)))) (goto-char beg) (mime-encode-region beg (mime-edit-content-end) (or encoding "7bit")) @@ -2605,11 +2631,7 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n" (or (cdr (assq major-mode mime-edit-message-max-lines-alist)) mime-edit-message-default-max-lines)) ) - (let* ((mime-edit-draft-file-name - (or (buffer-file-name) - (make-temp-name - (expand-file-name "mime-draft" temporary-file-directory)))) - (separator mail-header-separator) + (let* ((separator mail-header-separator) (id (concat "\"" (replace-space-with-underline (current-time-string)) "@" (system-name) "\""))) @@ -2670,7 +2692,7 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n" (message (format "Sending %d/%d..." mime-edit-partial-number total)) (call-interactively command) - (message (format "Sending %d/%d... done" + (message (format "Sending %d/%d...done" mime-edit-partial-number total)) ) (setq mime-edit-partial-number @@ -2688,7 +2710,7 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n" (save-excursion (message (format "Sending %d/%d..." mime-edit-partial-number total)) - (message (format "Sending %d/%d... done" + (message (format "Sending %d/%d...done" mime-edit-partial-number total)) ) ))) @@ -2937,7 +2959,8 @@ Content-Type: message/partial; id=%s; number=%d; total=%d\n%s\n" (setq encoded t encoding nil) ))))))) - (if (or encoded (not not-decode-text)) + (if (and (eq type 'text) + (or encoded (not not-decode-text))) (progn (save-excursion (goto-char (point-min))