(shimbun-mixi-default-group-alist): New constant;
authorhmurata <hmurata>
Sun, 25 Mar 2007 12:28:02 +0000 (12:28 +0000)
committerhmurata <hmurata>
Sun, 25 Mar 2007 12:28:02 +0000 (12:28 +0000)
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.

ChangeLog
sb-mixi.el

index 70d83fc..2588c4f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2007-03-25  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * 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  <bg66@koka-in.org>
 
        * INSTALL-CVS: New file.
index 0296884..22c9e4c 100644 (file)
@@ -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