- ;; For getting my profile.
- (unless (string-match mixi-friend-name-regexp buf)
- (with-mixi-retrieve (concat "/show_profile.pl?id="
- (mixi-friend-id friend))
- (setq buf buffer)))
- (if (string-match mixi-friend-name-regexp buf)
- (mixi-friend-set-name friend (match-string 2 buf))
- (mixi-realization-error 'cannot-find-name friend))
- (if (string-match mixi-friend-sex-regexp buf)
- (mixi-friend-set-sex friend
- (if (string= (match-string 3 buf) "ÃË")
- 'male 'female))
- (mixi-realization-error 'cannot-find-sex friend))
- (when (string-match mixi-friend-address-regexp buf)
- (mixi-friend-set-address friend (match-string 1 buf)))
- (when (string-match mixi-friend-age-regexp buf)
- (mixi-friend-set-age
- friend (string-to-number (match-string 2 buf))))
- (when (string-match mixi-friend-birthday-regexp buf)
- (mixi-friend-set-birthday
- friend (list (string-to-number (match-string 1 buf))
- (string-to-number (match-string 2 buf)))))
- (when (string-match mixi-friend-blood-type-regexp buf)
- (mixi-friend-set-blood-type friend (intern (match-string 1 buf))))
- (when (string-match mixi-friend-birthplace-regexp buf)
- (mixi-friend-set-birthplace friend (match-string 1 buf)))
- (when (string-match mixi-friend-hobby-regexp buf)
- (mixi-friend-set-hobby
- friend (split-string (match-string 2 buf) ", ")))
- (when (string-match mixi-friend-job-regexp buf)
- (mixi-friend-set-job friend (match-string 2 buf)))
- (when (string-match mixi-friend-organization-regexp buf)
- (mixi-friend-set-organization friend (match-string 2 buf)))
- (when (string-match mixi-friend-profile-regexp buf)
- (mixi-friend-set-profile friend (match-string 1 buf))))
+ (when (re-search-forward mixi-friend-name-regexp nil t)
+ (mixi-friend-set-name friend (match-string 2)))
+ (when (re-search-forward mixi-friend-sex-regexp nil t)
+ (mixi-friend-set-sex friend (if (string= (match-string 3) "ÃË")
+ 'male 'female)))
+ (when (re-search-forward mixi-friend-address-regexp nil t)
+ (mixi-friend-set-address friend (match-string 1)))
+ (when (re-search-forward mixi-friend-age-regexp nil t)
+ (mixi-friend-set-age friend (string-to-number (match-string 2))))
+ (when (re-search-forward mixi-friend-birthday-regexp nil t)
+ (mixi-friend-set-birthday friend
+ (list (string-to-number (match-string 1))
+ (string-to-number (match-string 2)))))
+ (when (re-search-forward mixi-friend-blood-type-regexp nil t)
+ (mixi-friend-set-blood-type friend (intern (match-string 1))))
+ (when (re-search-forward mixi-friend-birthplace-regexp nil t)
+ (mixi-friend-set-birthplace friend (match-string 1)))
+ (when (re-search-forward mixi-friend-hobby-regexp nil t)
+ (mixi-friend-set-hobby friend (split-string (match-string 2) ", ")))
+ (when (re-search-forward mixi-friend-job-regexp nil t)
+ (mixi-friend-set-job friend (match-string 2)))
+ (when (re-search-forward mixi-friend-organization-regexp nil t)
+ (mixi-friend-set-organization friend (match-string 2)))
+ (when (re-search-forward mixi-friend-profile-regexp nil t)
+ (mixi-friend-set-profile friend (match-string 1))))