aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sx-search.el12
-rw-r--r--sx-tag.el13
2 files changed, 17 insertions, 8 deletions
diff --git a/sx-search.el b/sx-search.el
index b33efff..b245cbe 100644
--- a/sx-search.el
+++ b/sx-search.el
@@ -126,9 +126,15 @@ prefix argument, the user is asked for everything."
(let ((tag (save-excursion
(when pos (goto-char pos))
(or (get-text-property (point) 'sx-tag)
- (thing-at-point 'symbol)))))
- (sx-search (or sx-question-list--site
- (sx-assoc-let sx-question-mode--data .site_par))
+ (thing-at-point 'symbol))))
+ (meta (save-excursion
+ (when pos (goto-char pos))
+ (get-text-property (point) 'sx-tag-meta)))
+ (site (replace-regexp-in-string
+ (rx string-start "meta.") ""
+ (or sx-question-list--site
+ (sx-assoc-let sx-question-mode--data .site_par)))))
+ (sx-search (concat (when meta "meta.") site)
nil tag)))
(provide 'sx-search)
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)