Function: cider-ns-edit--has-alias-p
cider-ns-edit--has-alias-p is a byte-compiled function defined in
cider-ns.el.
Signature
(cider-ns-edit--has-alias-p NS-START NS-END ALIAS)
Documentation
Return non-nil if the ns form from NS-START to NS-END gives a namespace ALIAS.
That's anywhere in the form, reader conditionals included, but not in a comment, a string or a discarded form.
Source Code
;; Defined in ~/.emacs.d/elpa/cider-20261106.1225/cider-ns.el
(defun cider-ns-edit--has-alias-p (ns-start ns-end alias)
"Return non-nil if the ns form from NS-START to NS-END gives a namespace ALIAS.
That's anywhere in the form, reader conditionals included, but not in a
comment, a string or a discarded form."
(save-excursion
(goto-char ns-start)
(let ((case-fold-search nil)
(regexp (concat ":as\\(?:-alias\\)?[ \t\n,]+" (regexp-quote alias) "[] \t\n,)]"))
found)
(while (and (not found) (re-search-forward regexp ns-end t))
(let ((beg (match-beginning 0)))
(unless (or (nth 8 (save-excursion (syntax-ppss beg)))
(cider-ns-edit--in-discarded-p beg))
(setq found t))))
found)))