aboutsummaryrefslogtreecommitdiff
path: root/sx-tag.el
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-02-14 15:48:53 -0200
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-02-14 15:48:53 -0200
commit9140a717b13b2e4919164b249f6d4b83b47ba53e (patch)
tree6432765345b58b414ae3d4769f8aabb9e794ab55 /sx-tag.el
parentcb29144eb54eb8541f469995a13909ec0bdb1c1d (diff)
Add an sx-tag-meta property to tags.
Diffstat (limited to 'sx-tag.el')
-rw-r--r--sx-tag.el13
1 files changed, 8 insertions, 5 deletions
diff --git a/sx-tag.el b/sx-tag.el
index 316226b..a59e0d7 100644
--- a/sx-tag.el
+++ b/sx-tag.el
@@ -142,17 +142,20 @@ tags."
;;; Printing
-(defun sx-tag--format (tag)
- "Format and return TAG for display."
+(defun sx-tag--format (tag &optional meta)
+ "Format and return TAG for display.
+If META is non-nil, the tag is for the meta site."
(with-temp-buffer
- (sx-tag--insert tag)
+ (sx-tag--insert tag meta)
(buffer-string)))
-(defun sx-tag--insert (tag)
- "Insert TAG button."
+(defun sx-tag--insert (tag &optional meta)
+ "Insert TAG button.
+If META is non-nil, the tag is for the meta site."
(insert-text-button (concat "[" tag "]")
'sx-button-copy tag
'sx-tag tag
+ 'sx-tag-meta meta
:type 'sx-button-tag))
(provide 'sx-tag)