From b87f9480ab0ce76b1af9641b984e92b3e149a40d Mon Sep 17 00:00:00 2001 From: bg66 Date: Tue, 24 Jul 2007 00:36:20 +0000 Subject: [PATCH] (with-mixi-retrieve): Follow the change of mixi. (with-mixi-post-form): Ditto. (mixi-login-form): New constant. (with-mixi-retrieve): Use it. (with-mixi-post-form): Ditto. --- ChangeLog | 8 ++++++++ mixi.el | 8 ++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2cffac9..173ba3b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-07-24 OHASHI Akira + + * mixi.el (with-mixi-retrieve): Follow the change of mixi. + (with-mixi-post-form): Ditto. + (mixi-login-form): New constant. + (with-mixi-retrieve): Use it. + (with-mixi-post-form): Ditto. + 2007-06-20 OHASHI Akira * mixi.el (mixi-diary-list-regexp): Follow the change of mixi. diff --git a/mixi.el b/mixi.el index 32672e0..afbf116 100644 --- a/mixi.el +++ b/mixi.el @@ -433,14 +433,15 @@ Increase this value when unexpected error frequently occurs." (defun mixi-logout () (mixi-retrieve "/logout.pl")) +(defconst mixi-login-form "
") + (defmacro with-mixi-retrieve (url &rest body) `(with-current-buffer (get-buffer-create mixi-temp-buffer-name) (when ,url (erase-buffer) (insert (mixi-retrieve ,url)) (goto-char (point-min)) - (when (search-forward - "" nil t) + (when (search-forward mixi-login-form nil t) (mixi-login) (erase-buffer) (insert (mixi-retrieve ,url)))) @@ -455,8 +456,7 @@ Increase this value when unexpected error frequently occurs." (erase-buffer) (insert (mixi-post-form ,url ,fields)) (goto-char (point-min)) - (when (search-forward - "" nil t) + (when (search-forward mixi-login-form nil t) (mixi-login) (erase-buffer) (insert (mixi-post-form ,url ,fields)))) -- 1.7.10.4