Permalink
Browse files

Isolate addition of text properties from a function parsing XML.

* twittering-mode.el: Isolate addition of text properties from a
function parsing XML.
(twittering-http-get-default-sentinel): call
`twittering-make-clickable-status-datum' here.
(twittering-atom-xmltree-to-status): do not add text properties to
statuses.
(twittering-status-to-status-datum): likewise.
  • Loading branch information...
cvmat committed Jan 16, 2011
1 parent 8a8e4fe commit ebff1103b37a5bd882604cb2ba0427964a2472dc
Showing with 31 additions and 25 deletions.
  1. +8 −0 ChangeLog
  2. +23 −25 twittering-mode.el
View
@@ -4,6 +4,14 @@
editing a tweet.
(twittering-ensure-whole-of-status-is-visible): new function.
+ * twittering-mode.el: Isolate addition of text properties from a
+ function parsing XML.
+ (twittering-http-get-default-sentinel): call
+ `twittering-make-clickable-status-datum' here.
+ (twittering-atom-xmltree-to-status): do not add text properties to
+ statuses.
+ (twittering-status-to-status-datum): likewise.
+
2011-01-09 Tadashi MATSUO <tad@mymail.twin.jp>
* twittering-mode.el: Ensure that encrypted strings are written
View
@@ -1939,13 +1939,14 @@ the server when the HTTP status code equals to 400 or 403."
(statuses
(let ((xmltree
(twittering-xml-parse-region (point-min) (point-max))))
- (cond
- ((null xmltree)
- nil)
- ((eq 'search (car spec))
- (twittering-atom-xmltree-to-status xmltree))
- (t
- (twittering-xmltree-to-status xmltree))))))
+ (mapcar 'twittering-make-clickable-status-datum
+ (cond
+ ((null xmltree)
+ nil)
+ ((eq 'search (car spec))
+ (twittering-atom-xmltree-to-status xmltree))
+ (t
+ (twittering-xmltree-to-status xmltree)))))))
(when statuses
(let ((new-statuses
(twittering-add-statuses-to-timeline-data statuses spec))
@@ -4056,9 +4057,7 @@ If `twittering-password' is nil, read it from the minibuffer."
(mapcar (lambda (x)
(if (eq (car-safe x) 'entry) `(,x) nil))
(cdar atom-xmltree)))))
- (mapcar (lambda (entry)
- (twittering-make-clickable-status-datum
- (twittering-atom-xmltree-to-status-datum entry)))
+ (mapcar 'twittering-atom-xmltree-to-status-datum
entry-list)))
(defun twittering-status-to-status-datum (status)
@@ -4134,21 +4133,20 @@ If `twittering-password' is nil, read it from the minibuffer."
(setq user-url (assq-get 'url user-data))
(setq user-protected (assq-get 'protected user-data))
- (twittering-make-clickable-status-datum
- (mapcar (lambda (sym)
- `(,sym . ,(symbol-value sym)))
- '(id text source created-at truncated
- in-reply-to-status-id
- in-reply-to-screen-name
- source-id
- user-id user-name user-screen-name user-location
- user-description
- user-profile-image-url
- user-url
- user-protected
- original-user-name
- original-user-screen-name
- recipient-screen-name))))))
+ (mapcar (lambda (sym)
+ `(,sym . ,(symbol-value sym)))
+ '(id text source created-at truncated
+ in-reply-to-status-id
+ in-reply-to-screen-name
+ source-id
+ user-id user-name user-screen-name user-location
+ user-description
+ user-profile-image-url
+ user-url
+ user-protected
+ original-user-name
+ original-user-screen-name
+ recipient-screen-name)))))
(defun twittering-make-clickable-status-datum (status)
(flet ((assq-get (item seq)

0 comments on commit ebff110

Please sign in to comment.