Skip to content

Commit

Permalink
Clear text properties of timeline spec string when requested.
Browse files Browse the repository at this point in the history
* twittering-mode.el (twittering-get-and-render-timeline): copy
spec-string and clear its text properties.
  • Loading branch information
cvmat committed Feb 14, 2010
1 parent 2eefb0d commit 6d63404
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
2010-02-15 Tadashi MATSUO <tad@mymail.twin.jp>

* twittering-mode.el (twittering-get-and-render-timeline): copy
spec-string and clear its text properties.

2010-02-14 Tadashi MATSUO <tad@mymail.twin.jp>

* twittering-mode.el (twittering-get-usernames-from-timeline): new
Expand Down
6 changes: 6 additions & 0 deletions twittering-mode.el
Expand Up @@ -2636,11 +2636,17 @@ variable `twittering-status-format'."
(spec-string (if (stringp spec)
spec
(twittering-timeline-spec-to-string spec)))
;; `spec-string' without text properites is required because
;; Emacs21 displays `spec-string' with its properties on mode-line.
;; In addition, copying `spec-string' keeps timeline-data from
;; being modified by `minibuf-isearch.el'.
(spec-string (copy-sequence spec-string))
(spec ;; normalized spec.
(twittering-string-to-timeline-spec spec-string)))
(when (null spec)
(error "\"%s\" is invalid as a timeline spec"
(or spec-string original-spec)))
(set-text-properties 0 (length spec-string) nil spec-string)
(cond
((and noninteractive (twittering-process-active-p))
;; ignore non-interactive request if a process is waiting for responses.
Expand Down

0 comments on commit 6d63404

Please sign in to comment.