Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions lisp/cider-util.el
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,14 @@ instead."
(cider--text-or-limits bounds (point) end)))))

(defun cider-get-ns-name ()
"Calls `clojure-find-ns', suppressing any errors.
Therefore, possibly returns nil,
so please handle that value from any callsites."
(clojure-find-ns :supress-errors))
"Return the current namespace in the buffer, suppressing any errors.
Uses `clojure-ts-find-ns' when the buffer is in `clojure-ts-mode',
otherwise falls back to `clojure-find-ns'.
Therefore, possibly returns nil, so please handle that value from any callsites."
(if (and (cider-clojure-ts-mode-p)
(fboundp 'clojure-ts-find-ns))
(clojure-ts-find-ns)
(clojure-find-ns :supress-errors)))

(defun cider-ns-form ()
"Retrieve the ns form."
Expand Down
Loading