clojure-emacs/cider — pull request #896 by pw4ever (2014-11-24 22:11:37+00:00)
Title: [Fix #894] Fix (cider-javadoc) regression: unable to input 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*), ...