Function: clojure-find-def

clojure-find-def is a byte-compiled function defined in clojure-mode.el.

Signature

(clojure-find-def)

Documentation

Find the var declaration macro and symbol name of the current form.

Returns a list pair, e.g. ("defn" "abc") or ("deftest" "some-test").

Source Code

;; Defined in ~/.emacs.d/elpa/clojure-mode-20260325.811/clojure-mode.el
(defun clojure-find-def ()
  "Find the var declaration macro and symbol name of the current form.
Returns a list pair, e.g. (\"defn\" \"abc\") or (\"deftest\" \"some-test\")."
  (save-excursion
    (unless (looking-at clojure-def-type-and-name-regex)
      (beginning-of-defun-raw))
    (when (search-forward-regexp clojure-def-type-and-name-regex nil t)
      (list (match-string-no-properties 1)
            (match-string-no-properties 2)))))