From 4d460d3b59df227c3f93e24f0ec8d87674cdce91 Mon Sep 17 00:00:00 2001 From: bg66 Date: Fri, 22 Dec 2006 01:28:02 +0000 Subject: [PATCH] * mixi.el (mixi-get-friends): Rename ARGS argument to FRIEND-OR-RANGE. (mixi-get-diaries): Ditto. (mixi-get-communities): Ditto. (mixi-get-messages): Rename ARGS argument to BOX-OR-RANGE. (mixi-get-introductions): Rename ARGS argument to FRIEND-OR-RANGE. --- ChangeLog | 8 +++++++ mixi.el | 75 +++++++++++++++++++++++++++++++------------------------------ 2 files changed, 46 insertions(+), 37 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9c6f0e6..a994741 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-12-22 OHASHI Akira + + * mixi.el (mixi-get-friends): Rename ARGS argument to FRIEND-OR-RANGE. + (mixi-get-diaries): Ditto. + (mixi-get-communities): Ditto. + (mixi-get-messages): Rename ARGS argument to BOX-OR-RANGE. + (mixi-get-introductions): Rename ARGS argument to FRIEND-OR-RANGE. + 2006-12-19 OHASHI Akira * mixi.el (mixi-object-realized-p): Rename from diff --git a/mixi.el b/mixi.el index b66dd8f..b119fa2 100644 --- a/mixi.el +++ b/mixi.el @@ -920,15 +920,16 @@ Increase this value when unexpected error frequently occurs." (defconst mixi-friend-list-nick-regexp "\\(.+\\)¤µ¤ó([0-9]+)
") -(defun mixi-get-friends (&rest args) +(defun mixi-get-friends (&rest friend-or-range) "Get friends of FRIEND." - (when (> (length args) 2) - (signal 'wrong-number-of-arguments (list 'mixi-get-friends (length args)))) - (let ((friend (nth 0 args)) - (range (nth 1 args))) + (when (> (length friend-or-range) 2) + (signal 'wrong-number-of-arguments (list 'mixi-get-friends + (length friend-or-range)))) + (let ((friend (nth 0 friend-or-range)) + (range (nth 1 friend-or-range))) (when (or (not (mixi-friend-p friend)) (mixi-friend-p range)) - (setq friend (nth 1 args)) - (setq range (nth 0 args))) + (setq friend (nth 1 friend-or-range)) + (setq range (nth 0 friend-or-range))) (unless (or (null friend) (mixi-friend-p friend)) (signal 'wrong-type-argument (list 'mixi-friend-p friend))) (let ((ids (mixi-get-matched-items (mixi-friend-list-page friend) @@ -1134,16 +1135,16 @@ Increase this value when unexpected error frequently occurs." (defconst mixi-diary-list-regexp "") -(defun mixi-get-diaries (&rest args) +(defun mixi-get-diaries (&rest friend-or-range) "Get diaries of FRIEND." - (when (> (length args) 2) + (when (> (length friend-or-range) 2) (signal 'wrong-number-of-arguments - (list 'mixi-get-diaries (length args)))) - (let ((friend (nth 0 args)) - (range (nth 1 args))) + (list 'mixi-get-diaries (length friend-or-range)))) + (let ((friend (nth 0 friend-or-range)) + (range (nth 1 friend-or-range))) (when (or (not (mixi-friend-p friend)) (mixi-friend-p range)) - (setq friend (nth 1 args)) - (setq range (nth 0 args))) + (setq friend (nth 1 friend-or-range)) + (setq range (nth 0 friend-or-range))) (unless (or (null friend) (mixi-friend-p friend)) (signal 'wrong-type-argument (list 'mixi-friend-p friend))) (let ((items (mixi-get-matched-items (mixi-diary-list-page friend) @@ -1404,16 +1405,16 @@ Increase this value when unexpected error frequently occurs." (defconst mixi-community-list-name-regexp "\\(.+\\)([0-9]+)") -(defun mixi-get-communities (&rest args) +(defun mixi-get-communities (&rest friend-or-range) "Get communities of FRIEND." - (when (> (length args) 2) + (when (> (length friend-or-range) 2) (signal 'wrong-number-of-arguments - (list 'mixi-get-communities (length args)))) - (let ((friend (nth 0 args)) - (range (nth 1 args))) + (list 'mixi-get-communities (length friend-or-range)))) + (let ((friend (nth 0 friend-or-range)) + (range (nth 1 friend-or-range))) (when (or (not (mixi-friend-p friend)) (mixi-friend-p range)) - (setq friend (nth 1 args)) - (setq range (nth 0 args))) + (setq friend (nth 1 friend-or-range)) + (setq range (nth 0 friend-or-range))) (unless (or (null friend) (mixi-friend-p friend)) (signal 'wrong-type-argument (list 'mixi-friend-p friend))) (let ((ids (mixi-get-matched-items (mixi-community-list-page friend) @@ -2209,17 +2210,17 @@ Increase this value when unexpected error frequently occurs." (defconst mixi-message-list-regexp "") -(defun mixi-get-messages (&rest args) - "Get messages." - (when (> (length args) 2) +(defun mixi-get-messages (&rest box-or-range) + "Get messages of BOX." + (when (> (length box-or-range) 2) (signal 'wrong-number-of-arguments - (list 'mixi-get-messages (length args)))) - (let ((box (nth 0 args)) - (range (nth 1 args))) + (list 'mixi-get-messages (length box-or-range)))) + (let ((box (nth 0 box-or-range)) + (range (nth 1 box-or-range))) (when (or (not (mixi-message-box-p box)) (mixi-message-box-p range)) - (setq box (nth 1 args)) - (setq range (nth 0 args))) + (setq box (nth 1 box-or-range)) + (setq range (nth 0 box-or-range))) (let ((items (mixi-get-matched-items (mixi-message-list-page (when box (mixi-message-box-name box))) @@ -2300,16 +2301,16 @@ Increase this value when unexpected error frequently occurs." ") -(defun mixi-get-introductions (&rest args) - "Get introductions." - (when (> (length args) 2) +(defun mixi-get-introductions (&rest friend-or-range) + "Get introductions of FRIEND." + (when (> (length friend-or-range) 2) (signal 'wrong-number-of-arguments - (list 'mixi-get-introduction (length args)))) - (let ((friend (nth 0 args)) - (range (nth 1 args))) + (list 'mixi-get-introduction (length friend-or-range)))) + (let ((friend (nth 0 friend-or-range)) + (range (nth 1 friend-or-range))) (when (or (not (mixi-friend-p friend)) (mixi-friend-p range)) - (setq friend (nth 1 args)) - (setq range (nth 0 args))) + (setq friend (nth 1 friend-or-range)) + (setq range (nth 0 friend-or-range))) (unless (or (null friend) (mixi-friend-p friend)) (signal 'wrong-type-argument (list 'mixi-friend-p friend))) (let* ((regexp (if friend mixi-introduction-list-regexp -- 1.7.10.4