From: hmurata Date: Sun, 25 Mar 2007 12:28:02 +0000 (+0000) Subject: (shimbun-mixi-default-group-alist): New constant; X-Git-Tag: mixi-el-1_0_0~42 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4ab9361c07cd54a16bd151b7488f9fb48fb7b06;p=elisp%2Fmixi.git (shimbun-mixi-default-group-alist): New constant; rename from `shimbun-mixi-group-alist'. (shimbun-mixi-group-alist): Change the default value to nil. (shimbun-mixi-group-alist): New function. (shimbun-groups): Use it instead of the same name variable. (shimbun-get-headers): Ditto. --- diff --git a/ChangeLog b/ChangeLog index 70d83fc..2588c4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-03-25 Hiroya Murata + + * sb-mixi.el (shimbun-mixi-default-group-alist): New constant; + rename from `shimbun-mixi-group-alist'. + (shimbun-mixi-group-alist): Change the default value to nil. + (shimbun-mixi-group-alist): New function. + (shimbun-groups): Use it instead of the same name variable. + (shimbun-get-headers): Ditto. + 2007-03-25 OHASHI Akira * INSTALL-CVS: New file. diff --git a/sb-mixi.el b/sb-mixi.el index 0296884..22c9e4c 100644 --- a/sb-mixi.el +++ b/sb-mixi.el @@ -37,7 +37,7 @@ (luna-define-class shimbun-mixi (shimbun) (comment-cache)) (luna-define-internal-accessors 'shimbun-mixi)) -(defcustom shimbun-mixi-group-alist +(defconst shimbun-mixi-default-group-alist '(("new-diaries" . mixi-get-new-diaries) ("new-comments" . mixi-get-new-comments) ("new-bbses" . mixi-get-new-bbses) @@ -96,6 +96,9 @@ ("news.pickup.it" . (lambda (range) (mixi-get-news 'IT 'pickup range)))) + "An alist of mixi shimbun group default definition.") + +(defcustom shimbun-mixi-group-alist nil "*An alist of mixi shimbun group definition. Each element looks like (NAME . URL) or (NAME . FUNCTION). NAME is a shimbun group name. @@ -126,6 +129,10 @@ of mixi object." h.d+'g\\I{D>Ocy?Rc4uYUyOZj2%2Kl>,x-!MCSsyi3!L}psrrC1jlF,O?Ui>qf)X;sBz`/}\\066X%$ siG'|4K!2?==|oB&#E'5GGH\\#z[muyQ"))) +(defun shimbun-mixi-group-alist () + (append shimbun-mixi-default-group-alist + shimbun-mixi-group-alist)) + (luna-define-method initialize-instance :after ((shimbun shimbun-mixi) &rest init-args) (shimbun-mixi-set-comment-cache-internal shimbun @@ -137,7 +144,7 @@ of mixi object." (mixi-logout)) (luna-define-method shimbun-groups ((shimbun shimbun-mixi)) - (mapcar 'car shimbun-mixi-group-alist)) + (mapcar 'car (shimbun-mixi-group-alist))) (luna-define-method shimbun-reply-to ((shimbun shimbun-mixi)) mixi-reply-to) @@ -184,7 +191,7 @@ of mixi object." (luna-define-method shimbun-get-headers ((shimbun shimbun-mixi) &optional range) (let ((url-or-function (cdr (assoc (shimbun-current-group-internal shimbun) - shimbun-mixi-group-alist))) + (shimbun-mixi-group-alist)))) (range (when (integerp range) (* range shimbun-mixi-page-articles)))) (shimbun-sort-headers (shimbun-mixi-get-headers shimbun