aboutsummaryrefslogtreecommitdiff
path: root/hcel-results.el
diff options
context:
space:
mode:
authorYuchen Pei <hi@ypei.me>2022-09-29 14:57:49 +1000
committerYuchen Pei <hi@ypei.me>2022-09-29 14:57:49 +1000
commit485026c5f20a109022f68200e43146f5dd7dc5cc (patch)
treef6a08714da7362f8c740c78fbb10aa75544e4b4e /hcel-results.el
parent7f73da1356d141d35047523a8ed0764a95385f7d (diff)
Fixing clean compiling warning.
Diffstat (limited to 'hcel-results.el')
-rw-r--r--hcel-results.el18
1 files changed, 7 insertions, 11 deletions
diff --git a/hcel-results.el b/hcel-results.el
index da0335e..75b35a0 100644
--- a/hcel-results.el
+++ b/hcel-results.el
@@ -269,11 +269,12 @@ Start by choosing a package."
(mapc
(lambda (result)
(insert "--\n")
- (insert (hcel-ids-render-result result)))
+ (insert (hcel-ids-render-result result
+ 'hcel-tag-span-button-load-source)))
(alist-get 'json results))
(goto-char (point-min))))
-(defun hcel-ids-render-result (result &optional button-action)
+(defun hcel-ids-render-result (result button-action)
(let* ((location-info (alist-get 'locationInfo result))
(doc (hcel-render-html
(or (alist-get 'doc result)
@@ -434,20 +435,15 @@ Start by choosing a package."
(hcel-ids 'package query hcel-package-id))
(define-key hcel-mode-map "i" #'hcel-package-ids)
-;; TODO: this is impossible with the current API, as definitionSite does not
-;; contain signature, and ExactLocation does not contain component name or even
-;; name
-(defun hcel-help-tag-span-button-action (marker)
- (hcel-help-internal
- (print (hcel-definition-site-location-info
- (get-text-property marker 'location-info)))))
-
+;; TODO: it is impossible with the current API to follow link within the help
+;; buffer, as definitionSite does not contain signature, and ExactLocation does
+;; not contain component name or even name
(defun hcel-help-internal (info)
(help-setup-xref (list #'hcel-help-internal info)
(called-interactively-p 'interactive))
(with-help-window (help-buffer)
(with-current-buffer standard-output
- (insert (hcel-ids-render-result info)))))
+ (insert (hcel-ids-render-result info 'hcel-tag-span-button-load-source)))))
(defun hcel-help (query)
(interactive