Skip to content

Commit

Permalink
Accept list names including non-ASCII characters.
Browse files Browse the repository at this point in the history
* twittering-mode.el: Accept list names including non-ASCII
characters.
(twittering-extract-timeline-spec): accept list names including
non-ASCII characters.
* test/test-twittering-mode.el (timeline-spec): add a test for a
list name including non-ASCII characters.
  • Loading branch information
cvmat committed Oct 30, 2011
1 parent 13e87fd commit c56e39c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 1 deletion.
7 changes: 7 additions & 0 deletions ChangeLog
Expand Up @@ -17,6 +17,13 @@
(twittering-show-replied-statuses): use
`twittering-render-a-field'.

* twittering-mode.el: Accept list names including non-ASCII
characters.
(twittering-extract-timeline-spec): accept list names including
non-ASCII characters.
* test/test-twittering-mode.el (timeline-spec): add a test for a
list name including non-ASCII characters.

2011-10-23 Tadashi MATSUO <tad@mymail.twin.jp>

* twittering-mode.el: Keep the private information unless the
Expand Down
1 change: 1 addition & 0 deletions NEWS
Expand Up @@ -119,6 +119,7 @@
You can define an edit skeleton that is performed only for organic
retweets. Note that edit skeletons cannot refer to the tweet being
retweeted in the current implementation.
* Support for list names including non-ASCII characters.

### Bug fixes
* Fix of displaying a message of authorization.
Expand Down
1 change: 1 addition & 0 deletions NEWS.ja
Expand Up @@ -116,6 +116,7 @@
`organic-retweet'が追加されました。非公式ReTweetにのみ適用されるedit
skeletonを定義できます。但し、現在の実装ではedit skeleton側から非公
式ReTweetされようとしているtweetの内容を参照することはできません。
* 非ASCII文字を含むリスト名に対応

### バグ修正
* 認証成功・失敗についてのメッセージが表示されるよう修正
Expand Down
10 changes: 10 additions & 0 deletions test/test-twittering-mode.el
@@ -1,3 +1,4 @@
;;; -*- coding: utf-8 -*-

(when (and (> 22 emacs-major-version)
(require 'url-methods nil t))
Expand Down Expand Up @@ -279,6 +280,15 @@
(test-restore-timeline-spec
"#tag" '(search "#tag") '(search "#tag"))
'(t t))

(test-assert-equal
(test-restore-timeline-spec
;; "リスト" consists of U+256A, U+2539 and U+2548.
;; They should be supported by raw Emacs21.
"USER/non-ASCIIリスト"
'(list "USER" "non-ASCIIリスト")
'(list "USER" "non-ASCIIリスト"))
'(t t))
)

(defun format-status (status format-str)
Expand Down
2 changes: 1 addition & 1 deletion twittering-mode.el
Expand Up @@ -3526,7 +3526,7 @@ Return cons of the spec and the rest string."
((null str)
(error "STR is nil")
nil)
((string-match "^\\([a-zA-Z0-9_-]+\\)/\\([a-zA-Z0-9_-]+\\)" str)
((string-match "^\\([a-zA-Z0-9_-]+\\)/\\([[:word:]_-]+\\)" str)
(let ((user (match-string 1 str))
(listname (match-string 2 str))
(rest (substring str (match-end 0))))
Expand Down

0 comments on commit c56e39c

Please sign in to comment.