diff options
author | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-08-24 22:36:49 +0100 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-08-24 22:36:49 +0100 |
commit | d8fc78fd3ae47dfbdff598b9da26d99341769c8b (patch) | |
tree | 0f81ebe45e537bc809ad9565d0bdc3880fa14ac5 /cider-util.el | |
parent | 38261508436a1648c35b5f7c07dc697f1def0d8e (diff) |
[Fix #1272] Return a proper button string in cider--readme-button
Diffstat (limited to 'cider-util.el')
-rw-r--r-- | cider-util.el | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/cider-util.el b/cider-util.el index b637e29e..3935d818 100644 --- a/cider-util.el +++ b/cider-util.el @@ -171,16 +171,18 @@ objects." "Return t if SYM is namespace-qualified." (string-match-p "[^/]+/" sym)) -(defun cider--insert-readme-button (label section-id) - "Insert a button that links to the online readme. +(defun cider--readme-button (label section-id) + "Return a button string that links to the online readme. LABEL is the displayed string, and SECTION-ID is where it points to." - (insert-button - label - 'follow-link t - 'action (lambda (&rest _) (interactive) - (browse-url (concat "https://github.com/clojure-emacs/cider#" - section-id))))) + (with-temp-buffer + (insert-text-button + label + 'follow-link t + 'action (lambda (&rest _) (interactive) + (browse-url (concat "https://github.com/clojure-emacs/cider#" + section-id)))) + (buffer-string))) (defun cider--project-name (dir) "Extracts a project name from DIR, possibly nil. |