(shimbun-mixi-send-mail): Ditto.
* mixi-utils.el (mixi-to-regexp): New constant.
(mixi-send-mail): New function.
* mixi-gnus.el (message-mixi-p): Follow the change above.
(message-send-via-mixi): Ditto.
* mixi-wl.el (wl-draft-send-mail-with-mixi): Ditto.
(mixi-wl-setup-draft-buffer): Ditto.
* acinclude.m4 (AC_EXAMINE_MODULES): Ditto.
+2007-04-19 OHASHI Akira <bg66@koka-in.org>
+
+ * sb-mixi.el (shimbun-mixi-to-regexp): Abolish.
+ (shimbun-mixi-send-mail): Ditto.
+ * mixi-utils.el (mixi-to-regexp): New constant.
+ (mixi-send-mail): New function.
+ * mixi-gnus.el (message-mixi-p): Follow the change above.
+ (message-send-via-mixi): Ditto.
+ * mixi-wl.el (wl-draft-send-mail-with-mixi): Ditto.
+ (mixi-wl-setup-draft-buffer): Ditto.
+ * acinclude.m4 (AC_EXAMINE_MODULES): Ditto.
+
2007-04-16 OHASHI Akira <bg66@koka-in.org>
* mixi-wl.el (wl-draft-send-mail-with-mixi): Check that title is not
if test ${HAVE_SHIMBUN} = yes; then
MODULES="${MODULES} ${MODULES_SHIMBUN}"
- if test ${HAVE_GNUS} = yes; then
- MODULES="${MODULES} ${MODULES_GNUS}"
- fi
- if test ${HAVE_WL} = yes; then
- MODULES="${MODULES} ${MODULES_WL}"
- fi
+ fi
+ if test ${HAVE_GNUS} = yes; then
+ MODULES="${MODULES} ${MODULES_GNUS}"
+ fi
+ if test ${HAVE_WL} = yes; then
+ MODULES="${MODULES} ${MODULES_WL}"
fi
if test ${HAVE_RIECE} = yes; then
MODULES="${MODULES} ${MODULES_RIECE}"
;;; Code:
-(require 'sb-mixi)
+(require 'mixi-utils)
(require 'message)
(defun message-mixi-p ()
(save-restriction
(message-narrow-to-headers)
(or (message-fetch-field "mixi-to")
- (string-match shimbun-mixi-to-regexp
- (message-fetch-field "to")))))))
+ (string-match mixi-to-regexp (message-fetch-field "to")))))))
(defun message-send-via-mixi (arg)
"Send the current message via mixi."
(insert (with-current-buffer mailbuf
(mml-buffer-substring-no-properties-except-hard-newlines
(point-min) (point-max))))
- (shimbun-mixi-send-mail (message-fetch-field "mixi-to")
- (message-fetch-field "subject")
- (buffer-substring (message-goto-body)
- (point-max))))
+ (mixi-send-mail (message-fetch-field "mixi-to")
+ (message-fetch-field "subject")
+ (buffer-substring (message-goto-body)
+ (point-max))))
(kill-buffer tembuf))
(set-buffer mailbuf)
(push 'mixi message-sent-message-via)))
(concat mixi-reply-to "message;"
(mixi-friend-id object))))))))
+(defconst mixi-to-regexp
+ "^mixi;\\([a-z]+\\);?\\([a-z0-9]+\\)?;?\\([0-9]+\\)?;?\\([0-9]+\\)?")
+
+(defun mixi-send-mail (to title content)
+ (when (string-match mixi-to-regexp to)
+ (let ((method (match-string 1 to)))
+ (cond ((string= method "comment")
+ (let ((parent (match-string 2 to))
+ (owner-id (match-string 3 to))
+ (id (match-string 4 to)))
+ (if (string= parent "diary")
+ (mixi-post-comment
+ (mixi-make-diary (mixi-make-friend owner-id) id) content)
+ (let ((func (intern
+ (concat mixi-object-prefix "make-" parent))))
+ (mixi-post-comment
+ (funcall func (mixi-make-community owner-id) id)
+ content)))))
+ ((string= method "topic")
+ (mixi-post-topic (mixi-make-community (match-string 2 to))
+ title content))
+ ((string= method "diary")
+ (mixi-post-diary title content))
+ ((string= method "message")
+ (mixi-post-message (mixi-make-friend (match-string 2 to))
+ title content))))))
+
(provide 'mixi-utils)
;;; mixi-utils.el ends here
;;; Code:
-(require 'sb-mixi)
+(require 'mixi-utils)
(require 'wl-draft)
(defsubst mixi-wl-get-recipients-from-buffer ()
"$\\|^$") nil t)
(point-marker)))
(id (std11-field-body "message-id")))
- (shimbun-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))
+ (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)
(shimbun-message shimbun "shimbun: Make contents...done")))
"")))))
-(defconst shimbun-mixi-to-regexp
- "^mixi;\\([a-z]+\\);?\\([a-z0-9]+\\)?;?\\([0-9]+\\)?;?\\([0-9]+\\)?")
-
-(defun shimbun-mixi-send-mail (to title content)
- (when (string-match shimbun-mixi-to-regexp to)
- (let ((method (match-string 1 to)))
- (cond ((string= method "comment")
- (let ((parent (match-string 2 to))
- (owner-id (match-string 3 to))
- (id (match-string 4 to)))
- (if (string= parent "diary")
- (mixi-post-comment
- (mixi-make-diary (mixi-make-friend owner-id) id) content)
- (let ((func (intern
- (concat mixi-object-prefix "make-" parent))))
- (mixi-post-comment
- (funcall func (mixi-make-community owner-id) id)
- content)))))
- ((string= method "topic")
- (mixi-post-topic (mixi-make-community (match-string 2 to))
- title content))
- ((string= method "diary")
- (mixi-post-diary title content))
- ((string= method "message")
- (mixi-post-message (mixi-make-friend (match-string 2 to))
- title content))))))
-
(provide 'sb-mixi)
;;; sb-mixi.el ends here