Function: cider--read-locals-from-next-sexp

cider--read-locals-from-next-sexp is a byte-compiled function defined in cider-mode.el.

Signature

(cider--read-locals-from-next-sexp)

Documentation

Return a list of all locals inside the next logical sexp.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/cider-mode.el
;;; Detecting local variables
(defun cider--read-locals-from-next-sexp ()
  "Return a list of all locals inside the next logical sexp."
  (save-excursion
    (ignore-errors
      (clojure-forward-logical-sexp 1)
      (let ((out nil)
            (end (point)))
        (forward-sexp -1)
        ;; FIXME: This returns locals found inside the :or clause of a
        ;; destructuring map.
        (while (search-forward-regexp "\\_<[^:&]\\(\\sw\\|\\s_\\)*\\_>" end 'noerror)
          (push (match-string-no-properties 0) out))
        out))))