aboutsummaryrefslogtreecommitdiff
path: root/sx-button.el
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2015-02-13 21:05:19 -0600
committerSean Allred <code@seanallred.com>2015-02-13 21:05:19 -0600
commit2e9fb5633907afdd6218e36a6be5412e87dcee2c (patch)
tree639e335eecefd6a3ce52a7288f96e8ce4ffb7b48 /sx-button.el
parent89132aa7b82abd1b54356831dda9d4dd28cf7492 (diff)
parent1f73185f411de81a5e26152377c499498d732d8c (diff)
Merge pull request #233 from vermiculus/tag-buttons
Tag buttons
Diffstat (limited to 'sx-button.el')
-rw-r--r--sx-button.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/sx-button.el b/sx-button.el
index 992c654..8a4bcc0 100644
--- a/sx-button.el
+++ b/sx-button.el
@@ -122,6 +122,12 @@ usually part of a code-block."
"link")
"Help echoed in the minibuffer when point is on a user.")
+(defconst sx-button--tag-help-echo
+ (format sx-button--help-echo
+ "Tag search"
+ "tag")
+ "Help echoed in the minibuffer when point is on a tag.")
+
(defconst sx-button--question-title-help-echo
(format sx-button--help-echo
"hide content"
@@ -163,6 +169,13 @@ usually part of a code-block."
'face 'sx-user-name
:supertype 'sx-button)
+(declare-function sx-search-tag-at-point "sx-tag")
+(define-button-type 'sx-button-tag
+ 'action #'sx-search-tag-at-point
+ 'help-echo sx-button--tag-help-echo
+ 'face 'sx-tag
+ :supertype 'sx-button)
+
(define-button-type 'sx-button-comment
'help-echo (concat "mouse-1, RET"
(propertize ": write a comment"