Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

moved autodoc back to where slime needs it to be

  • Loading branch information...
commit 1e31a472257e93b3eb29fa2313518d98807ddaee 1 parent 654251b
Hugo Duncan hugoduncan authored
31 src/swank/commands/contrib/swank_arglists.clj
View
@@ -1,7 +1,7 @@
(ns swank.commands.contrib.swank-arglists
- (:use (swank util core commands)))
-
-((slime-fn 'swank-require) :swank-c-p-c)
+ (:refer-clojure :exclude [load-file])
+ (:use (swank util core commands)
+ (swank.commands basic)))
(defslimefn arglist-for-echo-area [raw-specs & options]
(let [{:keys [arg-indices
@@ -24,3 +24,28 @@
(str variable-name " => " (var-get var)))))
(catch Exception e nil))
"")))
+
+
+(defn autodoc*
+ [raw-specs & options]
+ (let [{:keys [print-right-margin
+ print-lines]} (if (first options)
+ (apply hash-map options)
+ {})]
+ (if (and raw-specs
+ (seq? raw-specs))
+ (let [expr (some #(and (seq? %) (some #{:cursor-marker} %) %)
+ (tree-seq seq? seq raw-specs))]
+ (if (and (seq? expr) (not (= (first expr) "")))
+ ((slime-fn 'operator-arglist)
+ (first expr)
+ *current-package*)
+ `:not-available))
+ `:not-available)))
+
+(defslimefn autodoc
+ "Return a string representing the arglist for the deepest subform in
+RAW-FORM that does have an arglist.
+TODO: The highlighted parameter is wrapped in ===> X <===."
+ [raw-specs & options]
+ (apply autodoc* raw-specs options))
28 src/swank/commands/contrib/swank_autodoc.clj
View
@@ -1,28 +0,0 @@
-(ns swank.commands.contrib.swank-autodoc
- (:use (swank util core commands)
- [swank.commands.basic :only [operator-arglist]]))
-
-(defn autodoc*
- [raw-specs & options]
- (let [{:keys [print-right-margin
- print-lines]} (if (first options)
- (apply hash-map options)
- {})]
- (if (and raw-specs
- (seq? raw-specs))
- (let [expr (some #(and (seq? %) (some #{:cursor-marker} %) %)
- (tree-seq seq? seq raw-specs))]
- (if (and (seq? expr) (not (= (first expr) "")))
- ((slime-fn 'operator-arglist)
- (first expr)
- *current-package*)
- `:not-available))
- `:not-available)))
-
-(defslimefn autodoc
- "Return a string representing the arglist for the deepest subform in
-RAW-FORM that does have an arglist.
-TODO: The highlighted parameter is wrapped in ===> X <===."
- [raw-specs & options]
- (apply autodoc* raw-specs options))
-
5 ...ank/test_swank/commands/contrib/swank_autodoc.clj → ...nk/test_swank/commands/contrib/swank_arglists.clj
View
@@ -1,5 +1,6 @@
-(ns swank.test-swank.commands.contrib.swank-autodoc
- (:use swank.commands.contrib.swank-autodoc :reload-all)
+(ns swank.test-swank.commands.contrib.swank-arglists
+ (:refer-clojure :exclude [load-file])
+ (:use swank.commands.contrib.swank-arglists :reload-all)
(:use clojure.test))
(defn emacs-package-fixture [f]
Please sign in to comment.
Something went wrong with that request. Please try again.