diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-09-05 02:32:57 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-09-05 02:32:57 +0200 |
commit | 8fa762ae053d6d2523e59f86c273f64cc421d8ad (patch) | |
tree | d25055ace4e8ce541e4f335575d2298eb612d900 | |
parent | e1fbc2cf7fcd9a0bb77b1f9c0d8fe9d28102d6de (diff) | |
download | geiser-guile-8fa762ae053d6d2523e59f86c273f64cc421d8ad.tar.gz geiser-guile-8fa762ae053d6d2523e59f86c273f64cc421d8ad.tar.bz2 |
Guile: xref commands working again
-rw-r--r-- | elisp/geiser-xref.el | 9 | ||||
-rw-r--r-- | scheme/guile/geiser/xref.scm | 13 |
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) |