From: bg66 Date: Sun, 28 Sep 2008 03:38:51 +0000 (+0000) Subject: (mixi-news-url-regexp): Fix regexp. X-Git-Tag: mixi-el-2_0_0~1 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4bda9bf34d0cd8b4a323241101dc0b94889a442;p=elisp%2Fmixi.git (mixi-news-url-regexp): Fix regexp. (mixi-make-news-from-url): Follow the change above. --- diff --git a/ChangeLog b/ChangeLog index ab5d41b..5fe2c73 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-09-28 OHASHI Akira + + * mixi.el (mixi-news-url-regexp): Fix regexp. + (mixi-make-news-from-url): Follow the change above. + 2008-09-05 OHASHI Akira * mixi.el (mixi-diary-closed-regexp): Fix regexp. diff --git a/mixi.el b/mixi.el index a4e59ee..9951032 100644 --- a/mixi.el +++ b/mixi.el @@ -138,7 +138,7 @@ (autoload 'w3m-retrieve "w3m") (autoload 'url-retrieve-synchronously "url")) -(defconst mixi-revision "$Revision: 1.197 $") +(defconst mixi-revision "$Revision: 1.198 $") (defgroup mixi nil "API library for accessing to mixi." @@ -2832,13 +2832,13 @@ Increase this value when unexpected error frequently occurs." mixi-news-cache)) (defconst mixi-news-url-regexp - "/view_news\\.pl\\?id=\\([0-9]+\\)&media_id=\\([0-9]+\\)") + "/view_news\\.pl\\?\\(id=\\([0-9]+\\)&media_id=\\([0-9]+\\)\\|media_id=\\([0-9]+\\)&id=\\([0-9]+\\)\\)") (defun mixi-make-news-from-url (url) "Return a news object from URL." (when (string-match mixi-news-url-regexp url) - (let ((id (match-string 1 url)) - (media-id (match-string 2 url))) + (let ((id (or (match-string 2 url) (match-string 5 url))) + (media-id (or (match-string 3 url) (match-string 4 url)))) (mixi-make-news media-id id)))) (defmacro mixi-news-p (news)