From: yoichi Date: Sun, 7 Oct 2007 16:29:19 +0000 (+0000) Subject: * mixi-wl.el (mixi-wl-setup-draft-buffer): Avoid error when there is X-Git-Tag: mixi-el-1_0_0~11 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=796aaf9cd5767fb5e37d68c4d730fd99eea1608e;p=elisp%2Fmixi.git * mixi-wl.el (mixi-wl-setup-draft-buffer): Avoid error when there is no recipient. --- diff --git a/ChangeLog b/ChangeLog index f87da80..f5fb603 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-10-07 Yoichi NAKAYAMA + + * mixi-wl.el (mixi-wl-setup-draft-buffer): Avoid error when there is + no recipient. + 2007-10-04 OHASHI Akira * mixi.el (mixi-revision): New constant. diff --git a/mixi-wl.el b/mixi-wl.el index 7f404eb..bc9275b 100644 --- a/mixi-wl.el +++ b/mixi-wl.el @@ -63,11 +63,13 @@ (wl-draft-write-sendlog 'ok 'mixi nil (list recipients) id)))) (defun mixi-wl-setup-draft-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) - (setq wl-draft-send-mail-function 'wl-draft-send-mail-with-mixi))) + (let ((recipients (mixi-wl-get-recipients-from-buffer))) + (when (and recipients + (string-match mixi-to-regexp recipients)) + (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) + (setq wl-draft-send-mail-function 'wl-draft-send-mail-with-mixi)))) (defun mixi-wl-setup () (add-hook 'wl-draft-send-hook 'mixi-wl-setup-draft-buffer))