aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-01-15 20:04:24 -0200
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-01-15 20:04:24 -0200
commit2ee72cc4361031f3ab34e312fca191125ce18bfc (patch)
treebb17250a37f82a7f6356000862f21e93b518eff0
parent22f86c35499f994f0eb7532b8eb27b0d990d889d (diff)
Move tag-format to sx-tag.el
-rw-r--r--sx-question-list.el2
-rw-r--r--sx-question-print.el2
-rw-r--r--sx-question.el4
-rw-r--r--sx-tag.el6
4 files changed, 8 insertions, 6 deletions
diff --git a/sx-question-list.el b/sx-question-list.el
index 884f994..306d39f 100644
--- a/sx-question-list.el
+++ b/sx-question-list.el
@@ -170,7 +170,7 @@ Also see `sx-question-list-refresh'."
" "
;; @TODO: Make this width customizable. (Or maybe just make
;; the whole thing customizable)
- (propertize (format "%-40s" (mapconcat #'sx-question--tag-format .tags " "))
+ (propertize (format "%-40s" (mapconcat #'sx-tag--format .tags " "))
'face 'sx-question-list-tags)
" "
(sx-user--format "%15d %4r" .owner)
diff --git a/sx-question-print.el b/sx-question-print.el
index 9a51efb..b258fde 100644
--- a/sx-question-print.el
+++ b/sx-question-print.el
@@ -223,7 +223,7 @@ DATA can represent a question or an answer."
;; Tags
(sx-question-mode--insert-header
sx-question-mode-header-tags
- (mapconcat #'sx-question--tag-format .tags " ")
+ (mapconcat #'sx-tag--format .tags " ")
'sx-question-mode-tags))
;; Body
(insert "\n"
diff --git a/sx-question.el b/sx-question.el
index 1adbc24..0f73795 100644
--- a/sx-question.el
+++ b/sx-question.el
@@ -183,10 +183,6 @@ If no cache exists for it, initialize one with SITE."
(and (integerp .accepted_answer_id)
.accepted_answer_id)))
-(defun sx-question--tag-format (tag)
- "Formats TAG for display."
- (concat "[" tag "]"))
-
(provide 'sx-question)
;;; sx-question.el ends here
diff --git a/sx-tag.el b/sx-tag.el
index b2ad375..d69f330 100644
--- a/sx-tag.el
+++ b/sx-tag.el
@@ -133,6 +133,12 @@ tags."
(push input list))
(reverse list)))
+
+;;; Printing
+(defun sx-tag--format (tag)
+ "Formats TAG for display."
+ (concat "[" tag "]"))
+
(provide 'sx-tag)
;;; sx-tag.el ends here