Function: clojure--rename-ns-alias-internal
clojure--rename-ns-alias-internal is a byte-compiled function defined
in clojure-mode.el.
Signature
(clojure--rename-ns-alias-internal CURRENT-ALIAS NEW-ALIAS)
Documentation
Rename a namespace alias CURRENT-ALIAS to NEW-ALIAS.
Assume point is at the start of ns form.
Source Code
;; Defined in ~/.emacs.d/elpa/clojure-mode-20260325.811/clojure-mode.el
(defun clojure--rename-ns-alias-internal (current-alias new-alias)
"Rename a namespace alias CURRENT-ALIAS to NEW-ALIAS.
Assume point is at the start of ns form."
(clojure--find-ns-in-direction 'backward)
(let ((rgx (concat ":as +" (regexp-quote current-alias) "\\_>"))
(bound (save-excursion (forward-list 1) (point-marker))))
(when (search-forward-regexp rgx bound t)
(replace-match (concat ":as " new-alias))
(clojure--rename-ns-alias-usages current-alias new-alias bound (point-max)))))