Function: clojure--collect-ns-aliases
clojure--collect-ns-aliases is a byte-compiled function defined in
clojure-mode.el.
Signature
(clojure--collect-ns-aliases BEG END NS-FORM-P)
Documentation
Collect all aliases between BEG and END.
When NS-FORM-P is non-nil, treat the region as a ns form and pick up aliases from [... :as alias] forms, otherwise pick up alias usages from keywords / symbols.
Source Code
;; Defined in ~/.emacs.d/elpa/clojure-mode-20260325.811/clojure-mode.el
(defun clojure--collect-ns-aliases (beg end ns-form-p)
"Collect all aliases between BEG and END.
When NS-FORM-P is non-nil, treat the region as a ns form
and pick up aliases from [... :as alias] forms,
otherwise pick up alias usages from keywords / symbols."
(let ((res ()))
(save-excursion
(let ((rgx (if ns-form-p
(rx ":as" (+ space)
(group-n 1 (+ (not (in " ,]\n")))))
(clojure--alias-usage-regexp nil))))
(goto-char beg)
(while (re-search-forward rgx end 'noerror)
(unless (or (clojure--in-string-p) (clojure--in-comment-p))
(cl-pushnew (match-string-no-properties 1) res
:test #'equal)))
(reverse res)))))