Skip to content
This repository has been archived by the owner on Jan 23, 2018. It is now read-only.

Commit

Permalink
moved autodoc back to where slime needs it to be
Browse files Browse the repository at this point in the history
  • Loading branch information
hugoduncan committed Mar 13, 2010
1 parent 654251b commit 1e31a47
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 33 deletions.
31 changes: 28 additions & 3 deletions src/swank/commands/contrib/swank_arglists.clj
Original file line number Original file line Diff line number Diff line change
@@ -1,7 +1,7 @@
(ns swank.commands.contrib.swank-arglists (ns swank.commands.contrib.swank-arglists
(:use (swank util core commands))) (:refer-clojure :exclude [load-file])

(:use (swank util core commands)
((slime-fn 'swank-require) :swank-c-p-c) (swank.commands basic)))


(defslimefn arglist-for-echo-area [raw-specs & options] (defslimefn arglist-for-echo-area [raw-specs & options]
(let [{:keys [arg-indices (let [{:keys [arg-indices
Expand All @@ -24,3 +24,28 @@
(str variable-name " => " (var-get var))))) (str variable-name " => " (var-get var)))))
(catch Exception e nil)) (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 changes: 0 additions & 28 deletions src/swank/commands/contrib/swank_autodoc.clj

This file was deleted.

Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,6 @@
(ns swank.test-swank.commands.contrib.swank-autodoc (ns swank.test-swank.commands.contrib.swank-arglists
(:use swank.commands.contrib.swank-autodoc :reload-all) (:refer-clojure :exclude [load-file])
(:use swank.commands.contrib.swank-arglists :reload-all)
(:use clojure.test)) (:use clojure.test))


(defn emacs-package-fixture [f] (defn emacs-package-fixture [f]
Expand Down

0 comments on commit 1e31a47

Please sign in to comment.