diff options
author | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-02-14 15:48:53 -0200 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-02-14 15:48:53 -0200 |
commit | 9140a717b13b2e4919164b249f6d4b83b47ba53e (patch) | |
tree | 6432765345b58b414ae3d4769f8aabb9e794ab55 /sx-tag.el | |
parent | cb29144eb54eb8541f469995a13909ec0bdb1c1d (diff) |
Add an sx-tag-meta property to tags.
Diffstat (limited to 'sx-tag.el')
-rw-r--r-- | sx-tag.el | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -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) |