From 33746908e639e53320fe1412ae01b01854a98605 Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Thu, 15 Jan 2015 22:31:08 -0200 Subject: Define sx-tag--insert --- sx-tag.el | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sx-tag.el b/sx-tag.el index d9e2877..009c8b1 100644 --- a/sx-tag.el +++ b/sx-tag.el @@ -142,14 +142,18 @@ tags." ;;; Printing (defun sx-tag--format (tag) - "Formats TAG for display." + "Format and return TAG for display." (with-temp-buffer - (insert-text-button (concat "[" tag "]") - 'sx-button-copy tag - 'sx-tag tag - :type 'sx-button-tag) + (sx-tag--insert tag) (buffer-string))) +(defun sx-tag--insert (tag) + "Insert TAG button." + (insert-text-button (concat "[" tag "]") + 'sx-button-copy tag + 'sx-tag tag + :type 'sx-button-tag)) + (provide 'sx-tag) ;;; sx-tag.el ends here -- cgit v1.2.3