summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-11-13 01:58:35 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-11-13 01:58:35 +0100
commit297b1a9dc28753378eac60255f25a66e030769ce (patch)
tree11bdd9963202a8028e3721f08b753aec9758adf5
parente1907222291894821960dba34f2c16db831673d6 (diff)
downloadgeiser-chez-297b1a9dc28753378eac60255f25a66e030769ce.tar.gz
geiser-chez-297b1a9dc28753378eac60255f25a66e030769ce.tar.bz2
Bug fix: displaying signatures correctly in xref buffers.
-rw-r--r--elisp/geiser-autodoc.el5
-rw-r--r--elisp/geiser-xref.el12
2 files changed, 12 insertions, 5 deletions
diff --git a/elisp/geiser-autodoc.el b/elisp/geiser-autodoc.el
index 39dc636..d0345e0 100644
--- a/elisp/geiser-autodoc.el
+++ b/elisp/geiser-autodoc.el
@@ -119,9 +119,12 @@ when `geiser-autodoc-display-module-p' is on."
(defsubst geiser-autodoc--proc-name (proc module)
(let ((str (if module
(format geiser-autodoc-procedure-name-format module proc)
- proc)))
+ (format "%s" proc))))
(propertize str 'face 'geiser-font-lock-autodoc-procedure-name)))
+(defun geiser-autodoc--str* (full-signature)
+ (geiser-autodoc--str (list (car full-signature)) full-signature))
+
(defun geiser-autodoc--str (desc signature)
(let ((proc (car desc))
(args (cdr (assoc 'args signature)))
diff --git a/elisp/geiser-xref.el b/elisp/geiser-xref.el
index b53338a..657cfbc 100644
--- a/elisp/geiser-xref.el
+++ b/elisp/geiser-xref.el
@@ -12,6 +12,7 @@
(require' geiser-edit)
+(require 'geiser-autodoc)
(require 'geiser-eval)
(require 'geiser-popup)
(require 'geiser-custom)
@@ -53,21 +54,24 @@
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)))
+ (signature-txt (and signature
+ (geiser-autodoc--str* signature)))
(module (cdr (assoc 'module xref)))
(p (point)))
(when signature
(insert " - ")
(if (stringp file)
- (insert-text-button (format "%s" signature)
+ (insert-text-button signature-txt
:type 'geiser-xref--button
'location location
'name (car signature)
- 'help-echo (format "%s in %s" (car signature)
- file))
- (insert (format "%s" signature)))
+ 'help-echo (format "%s in %s"
+ (car signature) file))
+ (insert (format "%s" signature-txt)))
(fill-region p (point))
(save-excursion (goto-char p) (indent-sexp))
(newline))))