Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix clojure-emacs#894] Fix (cider-javadoc) regression: unable to inp…
…ut Java class name when no "symbol-at-point". The regression derives from complecting "cider-read-symbol-name" and "cider-completing-read-var": Not all symbols are vars, e.g., Java classes on JVM. The current solution is to add an optional parameter "notvarp" to "cider-read-symbol-name": When "notvarp" is nil (the default), complete var by the current "cider-completing-read-var"; otherwise (when "notvarp" is t), use "cider-read-from-minibuffer". "cider-javadoc" can call "cider-read-symbol-name" with "notvarp" being t to bypass "cider-completing-read-var". The logic is that, by its name, "cider-read-symbol-name" should work for both vars and non-var symbols (e.g., Java classes). However, most majority of current use of "cider-read-symbol-name" is for vars. So add a "notvarp" predicate (nil by default) would bridge the semantic gap between "cider-read-symbol-name" and "cider-completing-read-var" without disturbing most uses. WISHLIST: If only there could be a completion function for Java classes, perhaps derived on the nrepl side by (ns-imports *ns*), ...
- Loading branch information