Index: lang/elisp/twittering-mode/trunk/twittering-mode.el
===================================================================
--- lang/elisp/twittering-mode/trunk/twittering-mode.el (revision 38)
+++ lang/elisp/twittering-mode/trunk/twittering-mode.el (revision 47)
@@ -46,5 +46,5 @@
 (require 'parse-time)
 
-(defconst twittering-mode-version "0.4")
+(defconst twittering-mode-version "0.5")
 
 (defun twittering-mode-version ()
@@ -480,5 +480,5 @@
 	   (list-push (attr 'user-url) result))
 	  ((?j)                         ; %j - user.id
-	   (list-push (attr 'user-id) result))
+	   (list-push (format "%d" (attr 'user-id)) result))
 	  ((?p)                         ; %p - protected?
 	   (let ((protected (attr 'user-protected)))
@@ -499,18 +499,28 @@
 		 (now (current-time)))
 	     (let ((secs (+ (* (- (car now) (car created-at)) 65536)
-			    (- (cadr now) (cadr created-at)))))
-	       (list-push (cond ((< secs 5) "less than 5 seconds ago")
-				((< secs 10) "less than 10 seconds ago")
-				((< secs 20) "less than 20 seconds ago")
-				((< secs 30) "half a minute ago")
-				((< secs 60) "less than a minute ago")
-				((< secs 150) "1 minute ago")
-				((< secs 2400) (format "%d minutes ago"
-						       (/ (+ secs 30) 60)))
-				((< secs 5400) "about 1 hour ago")
-				((< secs 84600) (format "about %d hours ago"
-							(/ (+ secs 1800) 3600)))
-				(t (format-time-string "%I:%M %p %B %d, %Y" created-at)))
-			  result))))
+			    (- (cadr now) (cadr created-at))))
+		   time-string url)
+	       (setq time-string
+		     (cond ((< secs 5) "less than 5 seconds ago")
+			   ((< secs 10) "less than 10 seconds ago")
+			   ((< secs 20) "less than 20 seconds ago")
+			   ((< secs 30) "half a minute ago")
+			   ((< secs 60) "less than a minute ago")
+			   ((< secs 150) "1 minute ago")
+			   ((< secs 2400) (format "%d minutes ago"
+						  (/ (+ secs 30) 60)))
+			   ((< secs 5400) "about 1 hour ago")
+			   ((< secs 84600) (format "about %d hours ago"
+						   (/ (+ secs 1800) 3600)))
+			   (t (format-time-string "%I:%M %p %B %d, %Y" created-at))))
+	       (setq url (twittering-get-status-url (attr 'user-screen-name) (attr 'id)))
+	       ;; make status url clickable
+	       (add-text-properties
+		0 (length time-string)
+		`(mouse-face highlight
+			     face twittering-uri-face
+			     uri ,url)
+		time-string)
+	       (list-push time-string result))))
 	  ((?t)                         ; %t - text
 	   (list-push                   ;(clickable-text)
@@ -524,10 +534,14 @@
 	   (list-push (attr 'source) result))
 	  ((?#)                         ; %# - id
-	   (list-push (attr 'id) result))
+	   (list-push (format "%d" (attr 'id)) result))
 	  (t
 	   (list-push (char-to-string c) result)))
 	)
       (list-push (substring format-str cursor) result)
-      (apply 'concat (nreverse result))
+      (let ((formatted-status (apply 'concat (nreverse result))))
+	(add-text-properties 0 (length formatted-status)
+			     `(username ,(attr 'user-screen-name))
+			     formatted-status)
+	formatted-status)
       )))
 
@@ -695,10 +709,19 @@
 
       ;; make username clickable
-      (add-text-properties 0 (length user-screen-name)
-			   `(mouse-face highlight
-					uri ,(concat "http://twitter.com/" user-screen-name)
-					username ,user-screen-name
-					face twittering-username-face)
-			   user-screen-name)
+      (add-text-properties
+       0 (length user-name)
+       `(mouse-face highlight
+		    uri ,(concat "http://twitter.com/" user-screen-name)
+		    face twittering-username-face)
+       user-name)
+
+      ;; make screen-name clickable
+      (add-text-properties
+       0 (length user-screen-name)
+       `(mouse-face highlight
+		    face twittering-username-face
+		    uri ,(concat "http://twitter.com/" user-screen-name)
+		    face twittering-username-face)
+       user-screen-name)
 
       ;; make URI clickable
@@ -722,5 +745,4 @@
 		   highlight
 		   face twittering-uri-face
-		   username ,screen-name
 		   uri ,(concat "http://twitter.com/" screen-name))
 	       `(mouse-face highlight
@@ -730,12 +752,4 @@
 	  (setq regex-index (match-end 0)) ))
 
-      ;; make screen-name clickable
-      (add-text-properties
-       0 (length user-screen-name)
-       `(mouse-face highlight
-		    face twittering-username-face
-		    uri ,(concat "http://twitter.com/" user-screen-name)
-		    username ,user-screen-name)
-       user-screen-name)
 
       ;; make source pretty and clickable
@@ -1029,4 +1043,8 @@
       (buffer-substring start-pos end-pos))))
 
+(defun twittering-get-status-url (username id)
+  "Generate status URL."
+  (format "http://twitter.com/%s/statuses/%d" username id))
+
 ;;;###autoload
 (defun twit ()
Index: lang/elisp/twittering-mode/trunk/ChangeLog
===================================================================
--- lang/elisp/twittering-mode/trunk/ChangeLog (revision 38)
+++ lang/elisp/twittering-mode/trunk/ChangeLog (revision 47)
@@ -1,2 +1,11 @@
+2008-05-11  Tsuyoshi CHO  <Tsuyoshi.CHO+develop@Gmail.com>
+
+	* twittering-mode.el (twittering-format-status): id/user-idのフォー
+	マット整形。時間情報にuriを付与。Nicholasのパッチにより全体に
+	username情報を付与
+	(twittering-status-to-status-datum): username/user-screen-nameにつ
+	いて整理
+	(twittering-get-status-url): 新規関数(マクロでもいいんだけど...)
+
 2008-05-01  Tsuyoshi CHO  <Tsuyoshi.CHO+develop@Gmail.com>
 
