Function: cider-find-keyword

cider-find-keyword is an autoloaded, interactive and byte-compiled function defined in cider-find.el.

Signature

(cider-find-keyword &optional ARG)

Documentation

Find the namespace of the keyword at point and its primary occurrence there.

For instance - if the keyword at point is ":cider.demo/keyword", this command would find the namespace "cider.demo" and afterwards find the primary
(most relevant or first) mention of "::keyword" there.

Prompt according to prefix ARG and cider-prompt-for-symbol. A single or double prefix argument inverts the meaning of cider-prompt-for-symbol. A prefix of `-` or a double prefix argument causes the results to be displayed in a different window. The default value is thing at point.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-find.el
;;;###autoload
(defun cider-find-keyword (&optional arg)
  "Find the namespace of the keyword at point and its primary occurrence there.

For instance - if the keyword at point is \":cider.demo/keyword\", this command
would find the namespace \"cider.demo\" and afterwards find the primary
\(most relevant or first) mention of \"::keyword\" there.

Prompt according to prefix ARG and `cider-prompt-for-symbol'.
A single or double prefix argument inverts the meaning of
`cider-prompt-for-symbol'.  A prefix of `-` or a double prefix argument causes
the results to be displayed in a different window.  The default value is
thing at point."
  (interactive "P")
  (cider-ensure-session)
  (let* ((kw (let ((kw-at-point (cider-symbol-at-point 'look-back)))
               (if (cider--prompt-for-symbol-p arg)
                   (read-string
                    (format "Keyword (default %s): " kw-at-point)
                    nil nil kw-at-point)
                 kw-at-point)))
         (before (buffer-list))
         (result (if kw
                     (cider--find-keyword-loc kw)
                   (user-error "No keyword at point"))))
    (nrepl-dbind-response result (dest dest-point)
      (if dest-point
          (cider-jump-to dest dest-point (cider--open-other-window-p arg))
        (progn
          (unless (memq dest before)
            (kill-buffer dest))
          (user-error "Couldn't find a definition for %S" kw))))))