Function: cider-apropos-result

cider-apropos-result is a byte-compiled function defined in cider-apropos.el.

Signature

(cider-apropos-result RESULT QUERY DOCS-P)

Documentation

Emit a RESULT matching QUERY into current buffer, formatted for DOCS-P.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/cider-apropos.el
(defun cider-apropos-result (result query docs-p)
  "Emit a RESULT matching QUERY into current buffer, formatted for DOCS-P."
  (nrepl-dbind-response result (name type doc)
    (let* ((label (capitalize (if (string= type "variable") "var" type)))
           (help (concat "Display doc for this " (downcase label)))
           (props (list 'apropos-symbol name
                        'action #'cider-apropos-doc))
           (props (if cider-use-tooltips
                      (append props (list 'help-echo help))
                    props)))
      (cider-propertize-region props
        (insert-text-button name 'type 'apropos-symbol)
        (insert "\n  ")
        (insert-text-button label 'type (intern (concat "apropos-" type)))
        (insert ": ")
        (let ((beg (point)))
          (if docs-p
              (insert (cider-apropos-highlight doc query) "\n")
            (insert doc)
            (fill-region beg (point))))
        (insert "\n")))))