swank-picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/swank-picolisp.git/
Log | Files | Refs

commit 3d8389da7bd038f4d7426eb630d9f38523ff22c5
parent ef254aca22d1a59d9e0d7004631d87575fa9a773
Author: Tomas Hlavaty <tom@logand.com>
Date:   Fri, 29 Apr 2011 09:41:40 +0200

swank:find-definitions-for-emacs works with lisp functions too

Diffstat:
Mswank-picolisp.l | 22++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/swank-picolisp.l b/swank-picolisp.l @@ -193,12 +193,22 @@ ) (de swank:find-definitions-for-emacs (Nm) - (%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)) - () ) ) ) ) ) + (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)) + () ) ) ) ) ) ) ) ) ) (de swank:swank-toggle-trace (Nm) (trace (intern Nm)))