Created
September 16, 2010 12:51
-
-
Save faried/582369 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/twittering-mode.el b/twittering-mode.el | |
index 3a34794..143599c 100644 | |
--- a/twittering-mode.el | |
+++ b/twittering-mode.el | |
@@ -428,6 +428,7 @@ StatusNet Service.") | |
(mentions . "statuses/mentions") | |
(public . "statuses/public_timeline") | |
(replies . "statuses/replies") | |
+ (favorites . "favorites") | |
(retweeted_by_me . "statuses/retweeted_by_me") | |
(retweeted_to_me . "statuses/retweeted_to_me") | |
(retweets_of_me . "statuses/retweets_of_me"))) | |
@@ -2221,6 +2222,7 @@ as a list of a string on Emacs21." | |
;;; mentions (status containing @username) for the authenticating user. | |
;;; - (public): public timeline. | |
;;; - (replies): replies. | |
+;;; - (favorites): favorites. | |
;;; - (retweeted_by_me): retweets posted by the authenticating user. | |
;;; - (retweeted_to_me): retweets posted by the authenticating user's friends. | |
;;; - (retweets_of_me): | |
@@ -2235,7 +2237,7 @@ as a list of a string on Emacs21." | |
;;; | |
;;; SPEC ::= PRIMARY | COMPOSITE | |
;;; PRIMARY ::= USER | LIST | DIRECT_MESSSAGES | DIRECT_MESSSAGES_SENT | |
-;;; | FRIENDS | HOME | MENTIONS | PUBLIC | REPLIES | |
+;;; | FRIENDS | HOME | MENTIONS | PUBLIC | REPLIES | FAVORITES | |
;;; | RETWEETED_BY_ME | RETWEETED_TO_ME | RETWEETS_OF_ME | |
;;; | SEARCH | |
;;; COMPOSITE ::= MERGE | FILTER | |
@@ -2250,6 +2252,7 @@ as a list of a string on Emacs21." | |
;;; MENTIONS ::= ":mentions" | |
;;; PUBLIC ::= ":public" | |
;;; REPLIES ::= ":replies" | "@" | |
+;;; FAVORITES ::= ":favorites" | |
;;; RETWEETED_BY_ME ::= ":retweeted_by_me" | |
;;; RETWEETED_TO_ME ::= ":retweeted_to_me" | |
;;; RETWEETS_OF_ME ::= ":retweets_of_me" | |
@@ -2279,6 +2282,7 @@ If SHORTEN is non-nil, the abbreviated expression will be used." | |
((eq type 'mentions) ":mentions") | |
((eq type 'public) ":public") | |
((eq type 'replies) (if shorten "@" ":replies")) | |
+ ((eq type 'favorites) ":favorites") | |
((eq type 'retweeted_by_me) ":retweeted_by_me") | |
((eq type 'retweeted_to_me) ":retweeted_to_me") | |
((eq type 'retweets_of_me) ":retweets_of_me") | |
@@ -2322,6 +2326,8 @@ Return cons of the spec and the rest string." | |
`((home) . ,(substring str (match-end 0)))) | |
((string-match (concat "^" twittering-regexp-atmark) str) | |
`((replies) . ,(substring str (match-end 0)))) | |
+ ((string-match (concat "^" twittering-regexp-atmark) str) | |
+ `((favorites) . ,(substring str (match-end 0)))) | |
((string-match (concat "^" twittering-regexp-hash "\\([a-zA-Z0-9_-]+\\)") | |
str) | |
(let* ((tag (match-string 1 str)) | |
@@ -2338,6 +2344,7 @@ Return cons of the spec and the rest string." | |
("mentions" . mentions) | |
("public" . public) | |
("replies" . replies) | |
+ ("favorites" . favorites) | |
("retweeted_by_me" . retweeted_by_me) | |
("retweeted_to_me" . retweeted_to_me) | |
("retweets_of_me" . retweets_of_me)))) | |
@@ -2442,7 +2449,7 @@ Return nil if SPEC-STR is invalid as a timeline spec." | |
'(user list | |
direct_messages direct_messages_sent | |
friends home mentions public replies | |
- search | |
+ favorites search | |
retweeted_by_me retweeted_to_me retweets_of_me)) | |
(type (car spec))) | |
(memq type primary-spec-types))) | |
@@ -3498,6 +3505,7 @@ authorized -- The account has been authorized.") | |
(let ((km twittering-mode-map)) | |
(define-key km (kbd "C-c C-f") 'twittering-friends-timeline) | |
(define-key km (kbd "C-c C-r") 'twittering-replies-timeline) | |
+ (define-key km (kbd "C-c C-a") 'twittering-favorites-timeline) | |
(define-key km (kbd "C-c C-u") 'twittering-user-timeline) | |
(define-key km (kbd "C-c C-d") 'twittering-direct-messages-timeline) | |
(define-key km (kbd "C-c C-s") 'twittering-update-status-interactive) | |
@@ -3552,6 +3560,7 @@ authorized -- The account has been authorized.") | |
(let ((important-commands | |
'(("Timeline" . twittering-friends-timeline) | |
("Replies" . twittering-replies-timeline) | |
+ ("Favorites" . twittering-favorites-timeline) | |
("Update status" . twittering-update-status-interactive) | |
("Next" . twittering-goto-next-status) | |
("Prev" . twittering-goto-previous-status)))) | |
@@ -5986,6 +5995,10 @@ variable `twittering-status-format'." | |
(interactive) | |
(twittering-visit-timeline '(replies))) | |
+(defun twittering-favorites-timeline () | |
+ (interactive) | |
+ (twittering-visit-timeline '(favorites))) | |
+ | |
(defun twittering-public-timeline () | |
(interactive) | |
(twittering-visit-timeline '(public))) | |
@@ -6400,7 +6413,7 @@ managed by `twittering-mode'." | |
(append twittering-timeline-history | |
(twittering-get-usernames-from-timeline) | |
'(":direct_messages" ":direct_messages_sent" ":friends" | |
- ":home" ":mentions" ":public" ":replies" | |
+ ":home" ":mentions" ":public" ":replies" ":favorites" | |
":retweeted_by_me" ":retweeted_to_me" ":retweets_of_me"))) | |
(spec-string (twittering-completing-read prompt dummy-hist | |
nil nil initial 'dummy-hist)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment