From: bg66 Date: Mon, 23 Oct 2006 08:00:21 +0000 (+0000) Subject: * mixi.el (mixi-get-matched-items): Don't convert string to number. X-Git-Tag: cache-file-branchpoint~54 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=2be4d740a22b49c13e3f67cdfc5a1d4418d48095;p=elisp%2Fmixi.git * mixi.el (mixi-get-matched-items): Don't convert string to number. (mixi-login): Ditto. (mixi-make-me): Ditto. (mixi-friend-page): Ditto. (mixi-friend-list-page): Ditto. (mixi-diary-page): Ditto. (mixi-diary-list-page): Ditto. (mixi-community-page): Ditto. (mixi-community-realize): Ditto. (mixi-community-list-page): Ditto. (mixi-topic-page): Ditto. (mixi-topic-realize): Ditto. (mixi-topic-list-page): Ditto. (mixi-diary-comment-list-page): Ditto. (mixi-topic-comment-list-page): Ditto. (mixi-get-logs): Ditto. (mixi-get-comments): Ditto. --- diff --git a/ChangeLog b/ChangeLog index bd5c044..cd7c92a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,25 @@ 2006-10-23 OHASHI Akira + * mixi.el (mixi-get-matched-items): Don't convert string to number. + (mixi-login): Ditto. + (mixi-make-me): Ditto. + (mixi-friend-page): Ditto. + (mixi-friend-list-page): Ditto. + (mixi-diary-page): Ditto. + (mixi-diary-list-page): Ditto. + (mixi-community-page): Ditto. + (mixi-community-realize): Ditto. + (mixi-community-list-page): Ditto. + (mixi-topic-page): Ditto. + (mixi-topic-realize): Ditto. + (mixi-topic-list-page): Ditto. + (mixi-diary-comment-list-page): Ditto. + (mixi-topic-comment-list-page): Ditto. + (mixi-get-logs): Ditto. + (mixi-get-comments): Ditto. + +2006-10-23 OHASHI Akira + * mixi.el: Try to require `url' and `w3m'. (mixi-get-comments): Fix typo. diff --git a/mixi.el b/mixi.el index 9755b99..4a35c67 100644 --- a/mixi.el +++ b/mixi.el @@ -260,8 +260,7 @@ Increase this value when unexpected error frequently occurs." (error (mixi-message "Cannot login"))) (setq buffer (funcall mixi-retrieve-function "/check.pl?n=home.pl")) (if (string-match mixi-my-id-regexp buffer) - (setq mixi-me (mixi-make-friend - (string-to-number (match-string 1 buffer)))) + (setq mixi-me (mixi-make-friend (match-string 1 buffer))) (error (mixi-message "Cannot login")))))) (defun mixi-logout () @@ -289,14 +288,10 @@ Increase this value when unexpected error frequently occurs." (let ((num 1) list) (while (match-string num buffer) - (let ((string (match-string num buffer))) - (save-match-data - (when (string-match "^[0-9]+$" string) - (setq string (string-to-number string)))) - (setq list (cons string list))) + (setq list (cons (match-string num buffer) list)) (incf num)) - (setq ids (cons (reverse list) ids)) - (setq pos (match-end (1- num))))) + (setq ids (cons (reverse list) ids)) + (setq pos (match-end (1- num))))) (when (eq pos 0) (throw 'end ids)))) (incf page))) @@ -378,8 +373,7 @@ Increase this value when unexpected error frequently occurs." (unless mixi-me (with-mixi-retrieve "/home.pl" (if (string-match mixi-my-id-regexp buffer) - (setq mixi-me - (mixi-make-friend (string-to-number (match-string 1 buffer)))) + (setq mixi-me (mixi-make-friend (match-string 1 buffer))) (signal 'error (list 'who-am-i))))) mixi-me) @@ -387,7 +381,7 @@ Increase this value when unexpected error frequently occurs." `(eq (mixi-object-class ,friend) 'mixi-friend)) (defmacro mixi-friend-page (friend) - `(concat "/show_friend.pl?id=" (number-to-string (mixi-friend-id ,friend)))) + `(concat "/show_friend.pl?id=" (mixi-friend-id ,friend))) (defconst mixi-friend-nick-regexp "\"\\*\"
\n\\(.*\\)¤µ¤ó([0-9]+)") @@ -635,8 +629,7 @@ Increase this value when unexpected error frequently occurs." (defmacro mixi-friend-list-page (&optional friend) `(concat "/list_friend.pl?page=%d" - (when ,friend (concat "&id=" (number-to-string - (mixi-friend-id ,friend)))))) + (when ,friend (concat "&id=" (mixi-friend-id ,friend))))) (defconst mixi-friend-list-id-regexp "") @@ -892,8 +886,7 @@ Increase this value when unexpected error frequently occurs." `(eq (mixi-object-class ,community) 'mixi-community)) (defmacro mixi-community-page (community) - `(concat "/view_community.pl?id=" (number-to-string - (mixi-community-id ,community)))) + `(concat "/view_community.pl?id=" (mixi-community-id ,community))) (defconst mixi-community-nodata-regexp "^¥Ç¡¼¥¿¤¬¤¢¤ê¤Þ¤»¤ó") @@ -938,9 +931,8 @@ Increase this value when unexpected error frequently occurs." (if (string= (match-string 1 buffer) "home.pl") (mixi-community-set-owner community (mixi-make-me)) (mixi-community-set-owner - community (mixi-make-friend - (string-to-number (match-string 2 buffer)) - (match-string 3 buffer)))) + community (mixi-make-friend (match-string 2 buffer) + (match-string 3 buffer)))) (signal 'error (list 'cannot-find-owner community))) (if (string-match mixi-community-category-regexp buffer) (mixi-community-set-category community (match-string 1 buffer)) @@ -1088,8 +1080,7 @@ Increase this value when unexpected error frequently occurs." (defmacro mixi-community-list-page (&optional friend) `(concat "/list_community.pl?page=%d" - (when ,friend (concat "&id=" (number-to-string - (mixi-friend-id ,friend)))))) + (when ,friend (concat "&id=" (mixi-friend-id ,friend))))) (defconst mixi-community-list-id-regexp "\\([0-9]+\\)ǯ\\([0-9]+\\)·î\\([0-9]+\\)Æü
\\([0-9]+\\):\\([0-9]+\\)") @@ -1159,9 +1149,8 @@ Increase this value when unexpected error frequently occurs." (signal 'error (list 'cannot-find-title topic))) (if (string-match mixi-topic-owner-regexp buffer) (mixi-topic-set-owner topic - (mixi-make-friend - (string-to-number (match-string 1 buffer)) - (match-string 2 buffer))) + (mixi-make-friend (match-string 1 buffer) + (match-string 2 buffer))) (signal 'error (list 'cannot-find-owner topic))) (if (string-match mixi-topic-content-regexp buffer) (mixi-topic-set-content topic (mixi-remove-markup @@ -1249,7 +1238,7 @@ Increase this value when unexpected error frequently occurs." (defmacro mixi-topic-list-page (community) `(concat "/list_bbs.pl?page=%d" - "&id=" (number-to-string (mixi-community-id ,community)))) + "&id=" (mixi-community-id ,community))) (defconst mixi-topic-list-regexp "