Permalink
Browse files

Support dereferencing reference types (clojure.lang.ARef) in inspector.

  • Loading branch information...
technomancy committed Jun 4, 2009
1 parent 7b4d291 commit e2ec46fdd6533e093e26c4a0694cac4f29ca1d53
Showing with 5 additions and 1 deletion.
  1. +5 −1 swank/commands/inspector.clj
@@ -74,7 +74,8 @@
(string? obj) :string
(seq? obj) :seq
(instance? Class obj) :class
- (instance? clojure.lang.Namespace obj) :namespace)))
+ (instance? clojure.lang.Namespace obj) :namespace
+ (instance? clojure.lang.ARef obj) :aref)))
(defn inspect-meta-information [obj]
(when (> (count (meta obj)) 0)
@@ -153,6 +154,9 @@
(mapcat (fn [m]
`(" " (:value ~m) (:newline))) meths))))
+(defmethod emacs-inspect :aref [#^ARef obj]
+ `("Type: " (:value ~(class obj)) (:newline)
+ "Value: " (:value ~(deref obj)) (:newline)))
(defn ns-refers-by-ns [#^clojure.lang.Namespace ns]
(categorize-by (fn [#^clojure.lang.Var v] (. v ns))

0 comments on commit e2ec46f

Please sign in to comment.