Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add `source-spec' as an entry of alist storing a tweet.

* twittering-mode.el: Add `source-spec' as an entry of alist
storing a tweet.
(twittering-add-statuses-to-timeline-data): add the `source-spec'
property to each new status.
(twittering-make-common-properties): add `source-spec' as a common
property.
(twittering-get-common-properties): update docstring.
(twittering-render-timeline): do not add the `source-spec'
property.
  • Loading branch information...
commit 2c6ce8d7f5ec9e439e024aeaba63052ad1230b4f 1 parent 699739f
@cvmat cvmat authored
Showing with 15 additions and 7 deletions.
  1. +10 −0 ChangeLog
  2. +5 −7 twittering-mode.el
View
10 ChangeLog
@@ -65,6 +65,16 @@
(twittering-redisplay-status-on-each-buffer): restore common
properties.
+ * twittering-mode.el: Add `source-spec' as an entry of alist
+ storing a tweet.
+ (twittering-add-statuses-to-timeline-data): add the `source-spec'
+ property to each new status.
+ (twittering-make-common-properties): add `source-spec' as a common
+ property.
+ (twittering-get-common-properties): update docstring.
+ (twittering-render-timeline): do not add the `source-spec'
+ property.
+
2010-11-14 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Fix a bug in registration of a sentinel for
View
12 twittering-mode.el
@@ -3307,7 +3307,8 @@ Statuses are stored in ascending-order with respect to their IDs."
nil
(puthash id status id-table)
(puthash id id referring-id-table)
- status)))
+ `((source-spec . ,spec)
+ ,@status))))
statuses))))
(when new-statuses
(let ((new-timeline-data
@@ -5027,15 +5028,15 @@ static char * unplugged_xpm[] = {
(let ((prop-sym (if (consp entry) (car entry) entry))
(status-sym (if (consp entry) (cdr entry) entry)))
(list prop-sym (cdr (assq status-sym status)))))
- '(id source-id (username . user-screen-name) text))))
+ '(id source-id source-spec
+ (username . user-screen-name) text))))
(defun twittering-get-common-properties (pos)
"Get a common property list of the tweet rendered at POS.
The common property list is added to each rendered tweet irrespective
of format. The common properties follows:
properites generated by `twittering-make-common-properties',
- `original-id' added by `twittering-show-replied-statuses',
- `source-spec' added by `twittering-render-timeline'."
+ `original-id' added by `twittering-show-replied-statuses'."
(apply 'append
(mapcar (lambda (prop)
(let ((value (get-text-property pos prop)))
@@ -5495,9 +5496,6 @@ variable `twittering-status-format'."
(unless (twittering-status-id= id (get-text-property pos 'id))
(let ((formatted-status (twittering-format-status status))
(separator "\n"))
- (add-text-properties 0 (length formatted-status)
- `(source-spec ,spec)
- formatted-status)
(goto-char pos)
(cond
((eq pos (point-max))
Please sign in to comment.
Something went wrong with that request. Please try again.