From ea52102ada24aece8efec96fbd37ce302805cdaf Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Fri, 6 Mar 2009 00:55:41 +0100 Subject: A bit more robust generic methods. --- geiser/xref.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'geiser') diff --git a/geiser/xref.scm b/geiser/xref.scm index c94835a..cb39c5d 100644 --- a/geiser/xref.scm +++ b/geiser/xref.scm @@ -46,17 +46,17 @@ (define (describe-method name m) (let ((proc (method-procedure m))) (if proc - `((location . ,(program-location proc)) + `((location . ,(or (program-location proc) (symbol-location name))) (signature . ,(object-signature name proc))) '()))) (define (program-location p) - (cond ((not (program? p)) '()) + (cond ((not (program? p)) #f) ((program-source p 0) => (lambda (s) (make-location (program-path p) (source:line s)))) ((program-path p) => (lambda (s) (make-location (program-path p) #f))) - (else '()))) + (else #f))) (define (program-path p) (let* ((mod (program-module p)) -- cgit v1.2.3