diff options
author | Yuchen Pei <hi@ypei.me> | 2022-10-05 11:28:34 +1100 |
---|---|---|
committer | Yuchen Pei <hi@ypei.me> | 2022-10-05 11:28:34 +1100 |
commit | c4403522df754627d698f0806d3920764e3d1291 (patch) | |
tree | 11e8eedc5a361e003ec38af6a0a0600e107b0f7e /hcel-results.el | |
parent | 7f67167d097b6f5123946568fde14c7d43bbfd1e (diff) |
Adding ability to navigate within help buffer
Diffstat (limited to 'hcel-results.el')
-rw-r--r-- | hcel-results.el | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/hcel-results.el b/hcel-results.el index 6cac9de..3a676b9 100644 --- a/hcel-results.el +++ b/hcel-results.el @@ -436,17 +436,20 @@ Start by choosing a package." (hcel-ids 'package query hcel-package-id)) (define-key hcel-mode-map "i" #'hcel-package-ids) -;; 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-tag-span-button-help (marker) + (hcel-help-internal + (hcel-global-identifier + (get-text-property marker 'location-info) + (hcel-string-with-text-property-at-point 'location-info)))) + (defun hcel-help-internal (identifier) (help-setup-xref (list #'hcel-help-internal identifier) (called-interactively-p 'interactive)) (with-help-window (help-buffer) - (with-current-buffer standard-output - (insert - (hcel-ids-render-identifier - identifier 'hcel-tag-span-button-load-source))))) + (with-current-buffer standard-output + (insert + (hcel-ids-render-identifier + identifier 'hcel-tag-span-button-help))))) (defun hcel-help (query) (interactive |