From: bg66 Date: Thu, 1 Mar 2007 13:43:27 +0000 (+0000) Subject: * mixi.el (mixi-favorite-list-id-regexp): Abolish. X-Git-Tag: mixi-el-1_0_0~63 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91e7898a7c946b4b5f989eb4f85e416695ba7ca4;p=elisp%2Fmixi.git * mixi.el (mixi-favorite-list-id-regexp): Abolish. (mixi-favorite-list-nick-regexp): Ditto. (mixi-favorite-list-regexp): New regexp. (mixi-get-favorites): Follow the change above. --- diff --git a/ChangeLog b/ChangeLog index 342bba6..3c47a9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,15 @@ +2007-03-01 OHASHI Akira + + * mixi.el (mixi-favorite-list-id-regexp): Abolish. + (mixi-favorite-list-nick-regexp): Ditto. + (mixi-favorite-list-regexp): New regexp. + (mixi-get-favorites): Follow the change above. + 2007-02-23 OHASHI Akira * mixi-atom.el: New file. * Makefile.am (MODULES_MIXI): Add it. - + * mixi-utils.el (mixi-make-content): Support mixi-log object. * mixi.el (mixi-url-encode-string): New function. @@ -788,7 +795,7 @@ * sb-mixi.el (shimbun-mixi-make-subject): Follow the change above. (shimbun-mixi-make-body): Ditto. - + 2006-11-27 OHASHI Akira * mixi.el (mixi-event-cache): New variable. diff --git a/mixi.el b/mixi.el index c4e5c81..8b3a4d5 100644 --- a/mixi.el +++ b/mixi.el @@ -1068,28 +1068,19 @@ Increase this value when unexpected error frequently occurs." (defmacro mixi-favorite-list-page () `(concat "/list_bookmark.pl?page=%d")) -(defconst mixi-favorite-list-id-regexp - "") -(defconst mixi-favorite-list-nick-regexp - "̾  Á° -\\(.+\\)") +(defconst mixi-favorite-list-regexp + "̾Á° +\\(.*\\)") ;;;###autoload (defun mixi-get-favorites (&optional range) "Get favorites." - (let ((ids (mixi-get-matched-items (mixi-favorite-list-page) - mixi-favorite-list-id-regexp - range)) - (nicks (mixi-get-matched-items (mixi-favorite-list-page) - mixi-favorite-list-nick-regexp + (let ((items (mixi-get-matched-items (mixi-favorite-list-page) + mixi-favorite-list-regexp range))) - (let ((index 0) - ret) - (while (< index (length ids)) - (setq ret (cons (mixi-make-friend (nth 0 (nth index ids)) - (nth 0 (nth index nicks))) ret)) - (incf index)) - (reverse ret)))) + (mapcar (lambda (item) + (mixi-make-friend (nth 0 item) (nth 1 item))) + items))) ;; Log object. (defun mixi-make-log (friend time)