Index: lang/elisp/twittering-mode/trunk/twittering-mode.el
===================================================================
--- lang/elisp/twittering-mode/trunk/twittering-mode.el (revision 135)
+++ lang/elisp/twittering-mode/trunk/twittering-mode.el (revision 136)
@@ -98,5 +98,5 @@
 
 (defvar twittering-status-format nil)
-(setq twittering-status-format "%i %s,  %@:\n  %t // from %f%L")
+(setq twittering-status-format "%i %s,  %@:\n  %t // from %f%L%r")
 ;; %s - screen_name
 ;; %S - name
@@ -105,4 +105,5 @@
 ;; %l - location
 ;; %L - " [location]"
+;; %r - " in reply to user"
 ;; %u - url
 ;; %j - user.id
@@ -540,4 +541,18 @@
 	  ((?j)                         ; %j - user.id
 	   (list-push (attr 'user-id) result))
+	  ((?r)				; %r - in_reply_to_status_id
+	   (let ((reply-id (attr 'in-reply-to-status-id))
+		 (reply-name (attr 'in-reply-to-screen-name)))
+	     (unless (or (null reply-id) (string= "" reply-id)
+			 (null reply-name) (string= "" reply-name))
+	       (let ((in-reply-to-string (format "in reply to %s" reply-name))
+		     (url (twittering-get-status-url reply-name reply-id)))
+		 (add-text-properties
+		  0 (length in-reply-to-string)
+		  `(mouse-face highlight
+			       face twittering-uri-face
+			       uri ,url)
+		  in-reply-to-string)
+		 (list-push (concat " " in-reply-to-string) result)))))
 	  ((?p)                         ; %p - protected?
 	   (let ((protected (attr 'user-protected)))
@@ -603,5 +618,6 @@
       (let ((formatted-status (apply 'concat (nreverse result))))
 	(add-text-properties 0 (length formatted-status)
-			     `(username ,(attr 'user-screen-name))
+			     `(username ,(attr 'user-screen-name)
+					id ,(attr 'id))
 			     formatted-status)
 	formatted-status)
@@ -744,4 +760,6 @@
     (let* ((status-data (cddr status))
 	   id text source created-at truncated
+	   in-reply-to-status-id
+	   in-reply-to-screen-name
 	   (user-data (cddr (assq 'user status-data)))
 	   user-id user-name
@@ -761,4 +779,10 @@
       (setq created-at (assq-get 'created_at status-data))
       (setq truncated (assq-get 'truncated status-data))
+      (setq in-reply-to-status-id
+	    (twittering-decode-html-entities
+	     (assq-get 'in_reply_to_status_id status-data)))
+      (setq in-reply-to-screen-name
+	    (twittering-decode-html-entities
+	     (assq-get 'in_reply_to_screen_name status-data)))
       (setq user-id (assq-get 'id user-data))
       (setq user-name (twittering-decode-html-entities
@@ -779,5 +803,4 @@
        `(mouse-face highlight
 		    uri ,(concat "http://twitter.com/" user-screen-name)
-		    status-id ,id
 		    face twittering-username-face)
        user-name)
@@ -788,5 +811,4 @@
        `(mouse-face highlight
 		    uri ,(concat "http://twitter.com/" user-screen-name)
-		    status-id ,id
 		    face twittering-username-face)
        user-screen-name)
@@ -841,4 +863,6 @@
 	 `(,sym . ,(symbol-value sym)))
        '(id text source created-at truncated
+	    in-reply-to-status-id
+	    in-reply-to-screen-name
 	    user-id user-name user-screen-name user-location
 	    user-description
@@ -917,11 +941,10 @@
   (if (string-match "^\\s-*\\(?:@[-_a-z0-9]+\\)?\\s-*$" status)
       nil
-    (let ((parameters `(("status" . ,status)
-			("source" . "twmode"))))
-      (twittering-http-post "statuses" "update"
-			    (if reply-to-id
-				(cons `("in_reply_to_status_id" . ,(format "%s" reply-to-id))
-				      parameters)
-			      parameters)))
+    (let ((parameters (append `(("status" . ,status)
+				("source" . "twmode"))
+			      (if reply-to-id
+				  `(("in_reply_to_status_id"
+				     . ,reply-to-id))))))
+      (twittering-http-post "statuses" "update" parameters))
     t))
 
@@ -1070,9 +1093,8 @@
   (interactive)
   (let ((username (get-text-property (point) 'username))
-	(status-id (get-text-property (point) 'status-id))
+	(id (get-text-property (point) 'id))
 	(uri (get-text-property (point) 'uri)))
     (if username
-	(twittering-update-status-from-minibuffer (concat "@" username " ")
-						  status-id)
+	(twittering-update-status-from-minibuffer (concat "@" username " ") id)
       (if uri
 	  (browse-url uri)))))
