summaryrefslogtreecommitdiff
path: root/elisp/geiser-autodoc.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-03-03 01:05:12 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-03-03 01:05:12 +0100
commitf09c34f2749d223760654d3b5d0934a042d176b1 (patch)
tree54c8aa20a97cb932595d54bb914c11f8b2713fcc /elisp/geiser-autodoc.el
parentef1fcb91a47ef570f71b240aaf2a6ec529c9eb6e (diff)
downloadgeiser-chez-f09c34f2749d223760654d3b5d0934a042d176b1.tar.gz
geiser-chez-f09c34f2749d223760654d3b5d0934a042d176b1.tar.bz2
Highlight also #:key in autodoc.
Diffstat (limited to 'elisp/geiser-autodoc.el')
-rw-r--r--elisp/geiser-autodoc.el15
1 files changed, 11 insertions, 4 deletions
diff --git a/elisp/geiser-autodoc.el b/elisp/geiser-autodoc.el
index f4ffbae..da635cb 100644
--- a/elisp/geiser-autodoc.el
+++ b/elisp/geiser-autodoc.el
@@ -50,6 +50,10 @@
'font-lock-keyword-face
geiser-autodoc "highlighting #:opt marker in autodoc messages")
+(geiser-custom--defface autodoc-key-arg-marker
+ 'font-lock-keyword-face
+ geiser-autodoc "highlighting #:key marker in autodoc messages")
+
(defcustom geiser-autodoc-delay 0.2
"Delay before autodoc messages are fetched and displayed, in seconds."
:type 'number
@@ -94,10 +98,13 @@ when `geiser-autodoc-display-module-p' is on."
(defun geiser-autodoc--insert-arg (arg current pos)
(let ((p (point))
(str (format "%s" (if (eq arg '\#:rest) "." arg)))
- (face (or (and (eq '\#:opt arg)
- 'geiser-font-lock-autodoc-optional-arg-marker)
- (and (= current pos)
- 'geiser-font-lock-autodoc-current-arg))))
+ (face (cond ((eq '\#:opt arg)
+ 'geiser-font-lock-autodoc-optional-arg-marker)
+ ((eq '\#:key arg)
+ 'geiser-font-lock-autodoc-key-arg-marker)
+ ((= current pos)
+ 'geiser-font-lock-autodoc-current-arg)
+ (t nil))))
(insert str)
(when (listp arg)
(save-excursion