* mixi.el (mixi-entity-alist): New constant.
[elisp/mixi.git] / mixi-wl.el
index d4bf6e9..7f404eb 100644 (file)
 
 ;;; Code:
 
-(require 'sb-mixi)
-
-;; Functions and variables which should be defined in the other module
-;; at run-time.
-(eval-when-compile
-  (defvar mail-header-separator)
-  (defvar wl-mime-charset)
-  (defvar wl-draft-send-confirm-with-preview)
-  (defvar wl-draft-send-mail-function)
-  (autoload 'std11-field-body "std11")
-  (autoload 'eword-decode-string "eword-decode")
-  (autoload 'wl-draft-set-sent-message "wl-draft")
-  (autoload 'wl-draft-write-sendlog "wl-draft")
-  (autoload 'decode-mime-charset-string "mcharset"))
+(require 'mixi-utils)
+(require 'wl-draft)
 
 (defsubst mixi-wl-get-recipients-from-buffer ()
   (or (std11-field-body "mixi-to")
                                "$\\|^$") nil t)
                       (point-marker)))
          (id (std11-field-body "message-id")))
-      (shimbun-mixi-send-mail recipients
-                             (eword-decode-string
-                              (std11-field-body "subject"))
-                             (decode-mime-charset-string
-                              (buffer-substring (1+ delimline)
-                                                (point-max))
-                              wl-mime-charset))
+      (mixi-send-mail recipients
+                     (eword-decode-string (or (std11-field-body "subject")
+                                              ""))
+                     (decode-mime-charset-string
+                      (buffer-substring (1+ delimline) (point-max))
+                      wl-mime-charset))
       (wl-draft-set-sent-message 'mail 'sent)
       (wl-draft-write-sendlog 'ok 'mixi nil (list recipients) id))))
 
 (defun mixi-wl-setup-draft-buffer ()
-  (when (string-match shimbun-mixi-to-regexp
-                     (mixi-wl-get-recipients-from-buffer))
+  (when (string-match mixi-to-regexp (mixi-wl-get-recipients-from-buffer))
     (make-local-variable 'wl-draft-send-confirm-with-preview)
     (setq wl-draft-send-confirm-with-preview nil)
     (make-local-variable 'wl-draft-send-mail-function)