X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=wl%2Fwl-mime.el;h=1593d6b4cafb308b193654c7483b2ea75e1b1142;hb=7cda258222739c6726dcbc2c9ad21880493a6119;hp=c4b291c27966f6356c74135e34da7ca62f4cef3b;hpb=806725e3db0748ddc973ba045053a6681e840287;p=elisp%2Fwanderlust.git diff --git a/wl/wl-mime.el b/wl/wl-mime.el index c4b291c..1593d6b 100644 --- a/wl/wl-mime.el +++ b/wl/wl-mime.el @@ -1,6 +1,6 @@ ;;; wl-mime.el -- SEMI implementations of MIME processing on Wanderlust. -;; Copyright 1998,1999,2000 Yuuichi Teranishi +;; Copyright (C) 1998,1999,2000 Yuuichi Teranishi ;; Author: Yuuichi Teranishi ;; Keywords: mail, net news @@ -68,98 +68,38 @@ By setting following-method as yank-content." (defalias 'wl-draft-enclose-digest-region 'mime-edit-enclose-digest-region) -;; SEMI 1.13.5 or later. -;; (mime-display-message -;; MESSAGE &optional -;; PREVIEW-BUFFER MOTHER DEFAULT-KEYMAP-OR-FUNCTION ORIGINAL-MAJOR-MODE) -;; SEMI 1.13.4 or earlier. -;; (mime-display-message -;; MESSAGE &optional -;; PREVIEW-BUFFER MOTHER DEFAULT-KEYMAP-OR-FUNCTION) -(static-if (or (and mime-user-interface-product - (eq (nth 0 (aref mime-user-interface-product 1)) 1) - (>= (nth 1 (aref mime-user-interface-product 1)) 14)) - (and mime-user-interface-product - (eq (nth 0 (aref mime-user-interface-product 1)) 1) - (eq (nth 1 (aref mime-user-interface-product 1)) 13) - (>= (nth 2 (aref mime-user-interface-product 1)) 5))) - ;; Has original-major-mode optional argument. - (defalias 'wl-mime-display-message 'mime-display-message) - (defmacro wl-mime-display-message (message &optional - preview-buffer mother - default-keymap-or-function - original-major-mode) - (` (mime-display-message (, message) (, preview-buffer) (, mother) - (, default-keymap-or-function)))) - ;; User agent field of XEmacs has problem on SEMI 1.13.4 or earlier. - (setq mime-edit-user-agent-value - (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) - ") " (mime-product-name mime-library-product) - "/" (mapconcat #'number-to-string - (mime-product-version mime-library-product) ".") - " (" (mime-product-code-name mime-library-product) ") " - (if (featurep 'xemacs) - (concat - (if (featurep 'mule) "MULE") - " XEmacs" - (if (string-match "\\s +\\((\\|\\\"\\)" emacs-version) - (concat "/" (substring emacs-version 0 - (match-beginning 0)) - (if (and (boundp 'xemacs-betaname) - ;; It does not exist in XEmacs - ;; versions prior to 20.3. - xemacs-betaname) - (concat " " xemacs-betaname) - "") - " (" xemacs-codename ") (" - system-configuration ")") - " (" emacs-version ")")) - (let ((ver (if (string-match "\\.[0-9]+$" emacs-version) - (substring emacs-version 0 (match-beginning 0)) - emacs-version))) - (if (featurep 'mule) - (if (boundp 'enable-multibyte-characters) - (concat "Emacs/" ver - " (" system-configuration ")" - (if enable-multibyte-characters - (concat " MULE/" mule-version) - " (with unibyte mode)") - (if (featurep 'meadow) - (let ((mver (Meadow-version))) - (if (string-match "^Meadow-" mver) - (concat " Meadow/" - (substring mver - (match-end 0))))))) - (concat "MULE/" mule-version - " (based on Emacs " ver ")")) - (concat "Emacs/" ver " (" system-configuration ")"))))))) - -;; FLIM 1.12.7 -;; (mime-read-field FIELD-NAME &optional ENTITY) -;; FLIM 1.13.2 or later -;; (mime-entity-read-field ENTITY FIELD-NAME) -(static-if (fboundp 'mime-entity-read-field) - (defalias 'wl-mime-entity-read-field 'mime-entity-read-field) - (defmacro wl-mime-entity-read-field (entity field-name) - (` (mime-read-field (, field-name) (, entity))))) - (defun wl-draft-preview-message () + "" (interactive) - (let ((mime-display-header-hook 'wl-highlight-headers) - mime-view-ignored-field-list ; all header. - (mime-edit-translate-buffer-hook (append - (list 'wl-draft-config-exec) - mime-edit-translate-buffer-hook))) + (let* (recipients-message + (mime-display-header-hook 'wl-highlight-headers) + mime-view-ignored-field-list ; all header. + (mime-edit-translate-buffer-hook + (append + '((lambda () + (setq recipients-message + (concat "Recipients: " + (mapconcat + 'identity + (wl-draft-deduce-address-list + (current-buffer) + (point-min) + (save-excursion + (re-search-forward + (concat "^" + (regexp-quote mail-header-separator) + "$") + nil t) + (point))) + ", "))) + (run-hooks 'wl-draft-send-hook))) + mime-edit-translate-buffer-hook))) (mime-edit-preview-message) (let ((buffer-read-only nil)) (when wl-highlight-body-too (wl-highlight-body)) - (run-hooks 'wl-draft-preview-message-hook)))) + (run-hooks 'wl-draft-preview-message-hook)) + (message recipients-message))) (defalias 'wl-draft-caesar-region 'mule-caesar-region) @@ -190,7 +130,8 @@ By setting following-method as yank-content." (defun wl-message-request-partial (folder number) (elmo-set-work-buf (elmo-read-msg-no-cache folder number (current-buffer)) - (mime-parse-buffer nil))); 'mime-buffer-entity))) +;;;(mime-parse-buffer nil 'mime-buffer-entity) + (mime-parse-buffer nil))) (defalias 'wl-message-read 'mime-preview-scroll-up-entity) (defalias 'wl-message-next-content 'mime-preview-move-to-next) @@ -225,6 +166,7 @@ By setting following-method as yank-content." number)) (defun wl-summary-burst () + "" (interactive) (let ((raw-buf (wl-message-get-original-buffer)) children message-entity content-type target) @@ -242,7 +184,7 @@ By setting following-method as yank-content." (when children (message "Bursting...") (wl-summary-burst-subr children target 0) - (message "Bursting...done.")) + (message "Bursting...done")) (if (elmo-folder-plugged-p target) (elmo-commit target))) (wl-summary-sync-update3))) @@ -268,8 +210,7 @@ By setting following-method as yank-content." ;;; Yet another combine method. (defun wl-mime-combine-message/partial-pieces (entity situation) - "Internal method for wl to combine message/partial messages -automatically." + "Internal method for wl to combine message/partial messages automatically." (interactive) (let* ((msgdb (save-excursion (set-buffer wl-message-buffer-cur-summary-buffer) @@ -286,13 +227,13 @@ automatically." (setq root-dir (concat root-dir "/" (replace-as-filename id))) (setq full-file (concat root-dir "/FULL")) (if (or (file-exists-p full-file) - (not (y-or-n-p "Merge partials?"))) + (not (y-or-n-p "Merge partials? "))) (with-current-buffer mother (mime-store-message/partial-piece entity situation)) (setq subject-id (eword-decode-string (decode-mime-charset-string - (wl-mime-entity-read-field entity 'Subject) + (mime-entity-read-field entity 'Subject) wl-summary-buffer-mime-charset))) (if (string-match "[0-9\n]+" subject-id) (setq subject-id (substring subject-id 0 (match-beginning 0))))