Function: cider--read-locals-from-arglist
cider--read-locals-from-arglist is a byte-compiled function defined in
cider-mode.el.
Signature
(cider--read-locals-from-arglist)
Documentation
Return a list of all locals in current form's arglist(s).
Source Code
;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/cider-mode.el
(defun cider--read-locals-from-arglist ()
"Return a list of all locals in current form's arglist(s)."
(let ((out nil))
(save-excursion
(ignore-errors
(cider-start-of-next-sexp)
;; Named fn
(when (looking-at-p "\\s_\\|\\sw")
(cider-start-of-next-sexp 1))
;; Docstring
(when (eq (char-after) ?\")
(cider-start-of-next-sexp 1))
;; Attribute map
(when (eq (char-after) ?{)
(cider-start-of-next-sexp 1))
;; The arglist
(pcase (char-after)
(?\[ (setq out (cider--read-locals-from-next-sexp)))
;; FIXME: This returns false positives. It takes all arglists of a
;; function and returns all args it finds. The logic should be changed
;; so that each arglist applies to its own scope.
(?\( (ignore-errors
(while (eq (char-after) ?\()
(save-excursion
(forward-char 1)
(setq out (append (cider--read-locals-from-next-sexp) out)))
(cider-start-of-next-sexp 1)))))))
out))