From 2a540e211f05121448df37ac2fb3944c3a78a556 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sun, 6 Jun 2010 20:20:57 +0200 Subject: Elisp: fixes for key args display. --- elisp/geiser-autodoc.el | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'elisp/geiser-autodoc.el') diff --git a/elisp/geiser-autodoc.el b/elisp/geiser-autodoc.el index 4913088..4b797fc 100644 --- a/elisp/geiser-autodoc.el +++ b/elisp/geiser-autodoc.el @@ -81,7 +81,11 @@ when `geiser-autodoc-display-module-p' is on." (defun geiser-autodoc--sanitize-args (args) (cond ((null args) nil) ((listp args) - (cons (car args) (geiser-autodoc--sanitize-args (cdr args)))) + (let* ((arg (car args)) + (arg (if (and (consp arg) (eq (caar arg) ':keyword)) + (format "(#:%s %s)" (cdar arg) (cdr arg)) + arg))) + (cons arg (geiser-autodoc--sanitize-args (cdr args))))) (t '(...)))) (defun geiser-autodoc--insert-arg-group (args current &optional pos) @@ -115,12 +119,12 @@ when `geiser-autodoc-display-module-p' is on." (and (not (zerop pos)) pos)))) (when opts (insert " [") - (setq cpos (geiser-autodoc--insert-arg-group opts cpos pos)) - (when keys - (insert " [") - (geiser-autodoc--insert-arg-group keys prev nil) - (insert "]")) - (insert "]")))) + (setq cpos (geiser-autodoc--insert-arg-group opts cpos pos))) + (when keys + (insert " [") + (geiser-autodoc--insert-arg-group keys prev nil) + (insert "]")) + (when opts (insert "]")))) (defsubst geiser-autodoc--proc-name (proc module) (let ((str (if module -- cgit v1.2.3