summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--elisp/geiser-autodoc.el7
-rw-r--r--elisp/geiser-doc.el16
2 files changed, 12 insertions, 11 deletions
diff --git a/elisp/geiser-autodoc.el b/elisp/geiser-autodoc.el
index a92cb35..7bd8a8c 100644
--- a/elisp/geiser-autodoc.el
+++ b/elisp/geiser-autodoc.el
@@ -1,6 +1,6 @@
;;; geiser-autodoc.el -- autodoc mode
-;; Copyright (C) 2009, 2010, 2011, 2012, 2015, 2016 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010, 2011, 2012, 2015, 2016, 2021 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
@@ -134,8 +134,9 @@ when `geiser-autodoc-display-module-p' is on."
(propertize str 'face 'geiser-font-lock-autodoc-identifier)))
(defun geiser-autodoc--str* (full-signature)
- (let ((geiser-font-lock-autodoc-current-arg 'default))
- (geiser-autodoc--str (list (car full-signature)) full-signature)))
+ (let ((geiser-font-lock-autodoc-current-arg 'default)
+ (sign (if (listp full-signature) full-signature (list full-signature))))
+ (geiser-autodoc--str (list (car sign)) sign)))
(defsubst geiser-autodoc--value-str (proc module value)
(let ((name (geiser-autodoc--id-name proc module)))
diff --git a/elisp/geiser-doc.el b/elisp/geiser-doc.el
index 908ff3a..44a06ba 100644
--- a/elisp/geiser-doc.el
+++ b/elisp/geiser-doc.el
@@ -149,14 +149,14 @@ help (e.g. browse an HTML page) implementing this method.")
'help-echo help)))
(defun geiser-doc--insert-button (target module impl &optional sign)
- (let ((link (geiser-doc--make-link target module impl))
- (text (format "%s" (or (and sign
- (geiser-autodoc--str* sign))
- target
- module)))
- (help (format "%smodule %s"
- (if target (format "%s in " target) "")
- (or module "<unknown>"))))
+ (let* ((link (geiser-doc--make-link target module impl))
+ (sign (when sign (if (listp sign) sign (list target))))
+ (text (format "%s" (or (and sign (geiser-autodoc--str* sign))
+ target
+ module)))
+ (help (format "%smodule %s"
+ (if target (format "%s in " target) "")
+ (or module "<unknown>"))))
(insert-text-button text
:type 'geiser-doc--button
'face 'geiser-font-lock-doc-link