summaryrefslogtreecommitdiff
path: root/geiser/utils.scm
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-11-21 01:56:02 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-11-21 01:56:02 +0100
commit27989028649c5e651749a5ebdd7eaedf1cfa5314 (patch)
tree280b044d9122f13ac2cc03c479aaafc2aab8e183 /geiser/utils.scm
parent9c08f27ca364529c533e395b30200993a4900e36 (diff)
downloadgeiser-guile-27989028649c5e651749a5ebdd7eaedf1cfa5314.tar.gz
geiser-guile-27989028649c5e651749a5ebdd7eaedf1cfa5314.tar.bz2
Better module help
We now display procedure signatures in module help, and keep a cache in Guile, using procedure properties.
Diffstat (limited to 'geiser/utils.scm')
-rw-r--r--geiser/utils.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/geiser/utils.scm b/geiser/utils.scm
index 01dfaa0..632fe76 100644
--- a/geiser/utils.scm
+++ b/geiser/utils.scm
@@ -14,6 +14,7 @@
symbol->object
pair->list
sort-symbols!
+ make-symbol-sort
gensym?)
#:use-module (ice-9 regex))
@@ -37,6 +38,13 @@
(string<? (symbol->string l) (symbol->string r)))))
(sort! syms cmp)))
+(define (make-symbol-sort sel)
+ (let ((cmp (lambda (a b)
+ (string<? (symbol->string (sel a))
+ (symbol->string (sel b))))))
+ (lambda (syms)
+ (sort! syms cmp))))
+
(define (gensym? sym)
(and (symbol? sym) (gensym-name? (format "~A" sym))))