Skip to content

Commit

Permalink
fix bug with alias namespaces in completions
Browse files Browse the repository at this point in the history
  • Loading branch information
jochu committed Sep 18, 2009
1 parent 7a1a8a8 commit 8b8dd52
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/swank/commands/completion.clj
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,23 @@
(catch Throwable t
nil))))


(defn- maybe-alias [sym ns]
(or (resolve-ns sym (maybe-ns ns))
(maybe-ns ns)))

(defn potential-completions [symbol-ns ns]
(if symbol-ns
(map #(str symbol-ns "/" %)
(if-let [class (resolve-class symbol-ns)]
(potential-static class)
(potential-var-public symbol-ns)))
(potential-var-public (maybe-alias symbol-ns ns))))
(concat (potential-var ns)
(when-not symbol-ns
(potential-ns))
(potential-classes ns)
(potential-dot ns))))

(defn- maybe-alias [sym ns]
(or (resolve-ns sym (maybe-ns ns))
(maybe-ns ns)))

(defslimefn simple-completions [symbol-string package]
(try
Expand Down

0 comments on commit 8b8dd52

Please sign in to comment.