From: bg66 Date: Tue, 28 Nov 2006 00:56:21 +0000 (+0000) Subject: * mixi.el (mixi-object-title): Follow the event object. X-Git-Tag: mixi-el-1_0_0~187 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=a7215d23bc259809b77b7211c3c4dbcb38bf8c1b;p=elisp%2Fmixi.git * mixi.el (mixi-object-title): Follow the event object. (mixi-object-content): Ditto. (mixi-bbs-owner): New alias. (mixi-bbs-id): Ditto. (mixi-bbs-time): Ditto. (mixi-bbs-title): Ditto. (mixi-bbs-content): Ditto. * sb-mixi.el (shimbun-mixi-make-subject): Follow the change above. (shimbun-mixi-make-body): Ditto. --- diff --git a/ChangeLog b/ChangeLog index 9db03d9..e2258e1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2006-11-28 OHASHI Akira + + * mixi.el (mixi-object-title): Follow the event object. + (mixi-object-content): Ditto. + (mixi-bbs-owner): New alias. + (mixi-bbs-id): Ditto. + (mixi-bbs-time): Ditto. + (mixi-bbs-title): Ditto. + (mixi-bbs-content): Ditto. + + * 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 e0b360e..81c4b54 100644 --- a/mixi.el +++ b/mixi.el @@ -493,17 +493,38 @@ Increase this value when unexpected error frequently occurs." "Return the title of OBJECT." (unless (mixi-object-p object) (signal 'wrong-type-argument (list 'mixi-object-p object))) - (let ((func (intern (concat mixi-object-prefix - (mixi-object-name object) "-title")))) - (funcall func object))) + (let ((class (mixi-object-class object)) + (func (intern (concat mixi-object-prefix + (mixi-object-name object) "-title"))) + prefix) + (cond ((eq class 'mixi-event) + (setq prefix "[¥¤¥Ù¥ó¥È]"))) + (concat prefix (funcall func object)))) (defun mixi-object-content (object) "Return the content of OBJECT." (unless (mixi-object-p object) (signal 'wrong-type-argument (list 'mixi-object-p object))) - (let ((func (intern (concat mixi-object-prefix - (mixi-object-name object) "-content")))) - (funcall func object))) + (let ((class (mixi-object-class object))) + (cond ((eq class 'mixi-event) + (let ((limit (mixi-event-limit object))) + (setq limit (if limit + (format-time-string "%Yǯ%m·î%dÆü" limit) + "»ØÄê¤Ê¤·")) + (concat "
³«ºÅÆü»þ¡§
" + "
" (mixi-event-date object) "
" + "
³«ºÅ¾ì½ê¡§
" + "
" (mixi-event-place object) "
" + "
¾ÜºÙ¡§
" + "
" (mixi-event-detail object) "
" + "
Ê罸´ü¸Â¡§
" + "
" limit "
" + "
»²²Ã¼Ô¡§
" + "
" (mixi-event-members object) "
"))) + (t + (let ((func (intern (concat mixi-object-prefix + (mixi-object-name object) "-content")))) + (funcall func object)))))) (defun mixi-object-set-timestamp (object timestamp) "Set the timestamp of OBJECT." @@ -1626,7 +1647,13 @@ Increase this value when unexpected error frequently occurs." (signal 'wrong-type-argument (list 'mixi-event-p event))) (aset (cdr event) 10 members)) -;; Bbs. +;; Bbs object. +(defalias 'mixi-bbs-owner 'mixi-object-owner) +(defalias 'mixi-bbs-id 'mixi-object-id) +(defalias 'mixi-bbs-time 'mixi-object-time) +(defalias 'mixi-bbs-title 'mixi-object-title) +(defalias 'mixi-bbs-content 'mixi-object-content) + (defmacro mixi-bbs-list-page (community) `(concat "/list_bbs.pl?page=%d" "&id=" (mixi-community-id ,community))) diff --git a/sb-mixi.el b/sb-mixi.el index e58123a..856a38e 100644 --- a/sb-mixi.el +++ b/sb-mixi.el @@ -72,8 +72,6 @@ FUNCTION is the function for getting articles." (cond ((eq class 'mixi-comment) (concat "Re: " (shimbun-mixi-make-subject (mixi-comment-parent object)))) - ((eq class 'mixi-event) - (concat "[¥¤¥Ù¥ó¥È]" (mixi-object-title object))) (t (mixi-object-title object))))) (defun shimbun-mixi-make-from (object) @@ -119,23 +117,7 @@ FUNCTION is the function for getting articles." (mixi-expand-url (mixi-message-page object)))))) (defun shimbun-mixi-make-body (object) - (let ((class (mixi-object-class object))) - (if (eq class 'mixi-event) - (let ((limit (mixi-event-limit object))) - (setq limit (if limit - (format-time-string "%Yǯ%m·î%dÆü" limit) - "»ØÄê¤Ê¤·")) - (concat "
³«ºÅÆü»þ¡§
" - "
" (mixi-event-date object) "
" - "
³«ºÅ¾ì½ê¡§
" - "
" (mixi-event-place object) "
" - "
¾ÜºÙ¡§
" - "
" (mixi-event-detail object) "
" - "
Ê罸´ü¸Â¡§
" - "
" limit "
" - "
»²²Ã¼Ô¡§
" - "
" (mixi-event-members object) "
")) - (mixi-object-content object)))) + (mixi-object-content object)) (defun shimbun-mixi-get-headers (shimbun objects &optional range) (when objects