summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--elisp/geiser-xref.el9
-rw-r--r--scheme/guile/geiser/xref.scm13
2 files changed, 10 insertions, 12 deletions
diff --git a/elisp/geiser-xref.el b/elisp/geiser-xref.el
index 657cfbc..29bc008 100644
--- a/elisp/geiser-xref.el
+++ b/elisp/geiser-xref.el
@@ -1,6 +1,6 @@
;; geiser-xref.el -- utilities for cross-referencing
-;; Copyright (C) 2009 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010 Jose Antonio Ortega Ruiz
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the Modified BSD License. You should
@@ -54,7 +54,6 @@
geiser-xref-follow-link-method))))
(defun geiser-xref--insert-button (xref)
- (message "inserting %s" xref)
(let* ((location (cdr (assoc 'location xref)))
(file (geiser-edit--location-file location))
(signature (cdr (assoc 'signature xref)))
@@ -100,9 +99,9 @@
'geiser-font-lock-xref-header)
(newline 2)
(setq last-module module))
- (geiser-xref--insert-button xref))))
- (geiser-xref--pop-to-buffer)
- (goto-char (point-min))))
+ (geiser-xref--insert-button xref)))))
+ (geiser-xref--pop-to-buffer)
+ (goto-char (point-min)))
(defun geiser-xref--read-name (ask prompt)
(let ((name (or (and (not ask) (symbol-at-point))
diff --git a/scheme/guile/geiser/xref.scm b/scheme/guile/geiser/xref.scm
index 4f1b2cc..7dfa8af 100644
--- a/scheme/guile/geiser/xref.scm
+++ b/scheme/guile/geiser/xref.scm
@@ -48,20 +48,19 @@
(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)))
+ ((program-path p) => (lambda (s) (make-location s #f)))
(else #f)))
(define (program-path p)
(let* ((mod (program-module p))
- (name (and mod (module-name mod))))
+ (name (and (module? mod) (module-name mod))))
(and name (module-path name))))
(define (procedure-xref proc . mod-name)
- (let ((proc-name (or (procedure-name proc) '<anonymous>))
- (mod-name (if (null? mod-name)
- (symbol-module proc-name)
- (car mod-name))))
+ (let* ((proc-name (or (procedure-name proc) '<anonymous>))
+ (mod-name (if (null? mod-name)
+ (symbol-module proc-name)
+ (car mod-name))))
(make-xref proc proc-name mod-name)))
(define (callers sym)