Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove routines for the filter timeline.

* twittering-mode.el: Remove routines for the filter timeline.
(twittering-timeline-spec-to-string): remove routines for the
filter timeline.
(twittering-extract-timeline-spec): likewise.
(twittering-timeline-spec-primary-p): remove the mention to the
filter timeline from the docstring.
* test/test-twittering-mode.el: remove tests for the filter
timeline.
  • Loading branch information...
commit f2f847af4d5d98c9cb27fc38385c392fa046e70a 1 parent 3f49ab8
@cvmat cvmat authored
Showing with 21 additions and 62 deletions.
  1. +9 −0 ChangeLog
  2. +10 −37 test/test-twittering-mode.el
  3. +2 −25 twittering-mode.el
View
9 ChangeLog
@@ -3,6 +3,15 @@
* twittering-mode.el: Add some timeline specs to the definition of
timeline spec strings.
+ * twittering-mode.el: Remove routines for the filter timeline.
+ (twittering-timeline-spec-to-string): remove routines for the
+ filter timeline.
+ (twittering-extract-timeline-spec): likewise.
+ (twittering-timeline-spec-primary-p): remove the mention to the
+ filter timeline from the docstring.
+ * test/test-twittering-mode.el: remove tests for the filter
+ timeline.
+
2012-04-02 Tadashi MATSUO <tad@mymail.twin.jp>
* README.markdown: Fix the order of tags.
View
47 test/test-twittering-mode.el
@@ -184,32 +184,32 @@
(defcase timeline-spec nil nil
(test-assert-equal
(test-restore-timeline-spec
- "(user+(user/mylist+(@))+:filter/WORD/(USER2+:mentions))"
+ "(user+(user/mylist+(@))+:exclude-re/WORD/(USER2+:mentions))"
'(merge (user "user")
(merge (list "user" "mylist")
(merge (replies)))
- (filter "WORD" (merge (user "USER2")
- (mentions))))
+ (exclude-re "WORD" (merge (user "USER2")
+ (mentions))))
'(merge (user "user")
(list "user" "mylist")
(replies)
- (filter "WORD" (merge (user "USER2")
- (mentions)))))
+ (exclude-re "WORD" (merge (user "USER2")
+ (mentions)))))
'(t t))
(test-assert-equal
(test-restore-timeline-spec
- "(user-A+~+((user-B))+(:filter/R+/user-C+(:filter/R3\\//USER-D+:public)))"
+ "(user-A+~+((user-B))+(:exclude-re/R+/user-C+(:exclude-re/R3\\//USER-D+:public)))"
'(merge (user "user-A")
(home)
(merge (user "user-B")
- (filter "R+" (user "user-C")))
- (filter "R3/" (user "USER-D"))
+ (exclude-re "R+" (user "user-C")))
+ (exclude-re "R3/" (user "USER-D"))
(public))
'(merge (user "user-A")
(home)
(user "user-B")
- (filter "R+" (user "user-C"))
- (filter "R3/" (user "USER-D"))
+ (exclude-re "R+" (user "user-C"))
+ (exclude-re "R3/" (user "USER-D"))
(public)))
'(t t))
@@ -236,33 +236,6 @@
(test-assert-equal
(test-restore-timeline-spec
- ":filter/ABC/user/mylist"
- '(filter "ABC" (list "user" "mylist"))
- '(filter "ABC" (list "user" "mylist")))
- '(t t))
- (test-assert-equal
- (test-restore-timeline-spec
- ":filter/ABC\\/user/mylist"
- '(filter "ABC/user" (user "mylist"))
- '(filter "ABC/user" (user "mylist")))
- '(t t))
-
- (test-assert-equal
- (test-restore-timeline-spec
- ":filter/ABC\\\\/user/mylist"
- '(filter "ABC\\\\" (list "user" "mylist"))
- '(filter "ABC\\\\" (list "user" "mylist")))
- '(t t))
-
- (test-assert-equal
- (test-restore-timeline-spec
- ":filter/\\\\/user/mylist"
- '(filter "\\\\" (list "user" "mylist"))
- '(filter "\\\\" (list "user" "mylist")))
- '(t t))
-
- (test-assert-equal
- (test-restore-timeline-spec
":exclude-if/test-exclude-if-function/:home"
'(exclude-if test-exclude-if-function (home))
'(exclude-if test-exclude-if-function (home)))
View
27 twittering-mode.el
@@ -3752,7 +3752,6 @@ Before calling this, you have to configure `twittering-bitly-login' and
;;; that matches the regular expression specified by REGEXP-STRING.
;;;
;;; - (merge SPEC1 SPEC2 ...): result of merging timelines SPEC1 SPEC2 ...
-;;; - (filter REGEXP SPEC): timeline filtered with REGEXP.
;;;
;;; Timeline spec string
@@ -3763,7 +3762,7 @@ Before calling this, you have to configure `twittering-bitly-login' and
;;; | RETWEETED_BY_ME | RETWEETED_BY_USER
;;; | RETWEETED_TO_ME | RETWEETED_TO_USER | RETWEETS_OF_ME
;;; | SEARCH
-;;; COMPOSITE ::= EXCLUDE-IF | EXCLUDE-RE | MERGE | FILTER
+;;; COMPOSITE ::= EXCLUDE-IF | EXCLUDE-RE | MERGE
;;;
;;; USER ::= /[a-zA-Z0-9_-]+/
;;; LIST ::= USER "/" LISTNAME
@@ -3791,7 +3790,6 @@ Before calling this, you have to configure `twittering-bitly-login' and
;;;
;;; MERGE ::= "(" MERGED_SPECS ")"
;;; MERGED_SPECS ::= SPEC | SPEC "+" MERGED_SPECS
-;;; FILTER ::= ":filter/" REGEXP "/" SPEC
;;;
(defvar twittering-regexp-hash
@@ -3851,13 +3849,6 @@ If SHORTEN is non-nil, the abbreviated expression will be used."
(replace-regexp-in-string "/" "\\\\\/" regexp-str)
"/"
(twittering-timeline-spec-to-string spec))))
- ((eq type 'filter)
- (let ((regexp (car value))
- (spec (cadr value)))
- (concat ":filter/"
- (replace-regexp-in-string "/" "\\/" regexp nil t)
- "/"
- (twittering-timeline-spec-to-string spec))))
((eq type 'merge)
(concat "("
(mapconcat 'twittering-timeline-spec-to-string value "+")
@@ -3993,20 +3984,6 @@ Return cons of the spec and the rest string."
(t
(error "\"%s\" has no valid regexp" str)
nil)))
- ((string= type "filter")
- (if (string-match "^:filter/\\(\\(.*?[^\\]\\)??\\(\\\\\\\\\\)*\\)??/"
- str)
- (let* ((escaped-regexp (or (match-string 1 str) ""))
- (regexp (replace-regexp-in-string "\\\\/" "/"
- escaped-regexp nil t))
- (following (substring str (match-end 0)))
- (pair (twittering-extract-timeline-spec
- following unresolved-aliases))
- (spec (car pair))
- (rest (cdr pair)))
- `((filter ,regexp ,spec) . ,rest))
- (error "\"%s\" has no valid regexp" str)
- nil))
(t
(error "\"%s\" is invalid as a timeline spec" str)
nil))))
@@ -4075,7 +4052,7 @@ Return nil if SPEC-STR is invalid as a timeline spec."
(defun twittering-timeline-spec-primary-p (spec)
"Return non-nil if SPEC is a primary timeline spec.
`primary' means that the spec is not a composite timeline spec such as
-`filter' and `merge'."
+`merge'."
(let ((primary-spec-types
'(user list
direct_messages direct_messages_sent
Please sign in to comment.
Something went wrong with that request. Please try again.