commit 46bc2609f4b9f5611bd97797262ff3ff0c282df3 parent 63a06ba169dc09ae1aac88809e1b9ae744365a6b Author: Tomas Hlavaty <tom@logand.com> Date: Sat, 30 Apr 2011 13:26:22 +0200 better %swank:ensure-autodoc-built-in and swank:find-definitions-for-emacs Diffstat:
M | swank-picolisp.l | | | 32 | ++++++++++++++------------------ |
1 file changed, 14 insertions(+), 18 deletions(-)
diff --git a/swank-picolisp.l b/swank-picolisp.l @@ -140,11 +140,11 @@ (pack @A) (pack @Z) (pack @F) - (format (pack @N)) ) ) ) ) ) ) ) ) + (format (pack @N)) ) ) ) ) ) ) ) + *Swank:autodoc-built-in ) (de %swank:autodoc-built-in (Nm) - (%swank:ensure-autodoc-built-in) - (let? X (cadr (assoc Nm *Swank:autodoc-built-in)) + (let? X (cadr (assoc Nm (%swank:ensure-autodoc-built-in))) (pack "(" X) ) ) ##(%swank:autodoc-built-in "pack") @@ -194,21 +194,17 @@ (de swank:find-definitions-for-emacs (Nm) (let Sym (intern Nm) - (let? Def (val Sym) - (cond - ((or (not Def) (= Nm Def))) ## not defined - ((atom Def) ## built-in - (%swank:ensure-autodoc-built-in) - (let? X (assoc Nm *Swank:autodoc-built-in) - (list (list Nm (list ':location - (list ':file (caddr X)) - (list ':line (cadddr X)) - () ) ) ) ) ) - (T (let? X (get Sym '*Dbg) ## lisp - (list (list Nm (list ':location - (list ':file (path (cadar X))) - (list ':line (caar X)) - () ) ) ) ) ) ) ) ) ) + (or + (let? X (get Sym '*Dbg) + (list (list Nm (list ':location + (list ':file (path (cadar X))) + (list ':line (caar X)) + () ) ) ) ) + (let? X (assoc Nm (%swank:ensure-autodoc-built-in)) + (list (list Nm (list ':location + (list ':file (caddr X)) + (list ':line (cadddr X)) + () ) ) ) ) ) ) ) (de swank:swank-toggle-trace (Nm) (trace (intern Nm)))