summaryrefslogtreecommitdiff
path: root/scheme/guile/geiser/modules.scm
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-06-16 23:05:16 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-06-16 23:05:16 +0200
commit4bbe14d551f06608a9df68b4270c5d8b3fc3eb97 (patch)
treeb06b746a2e31ce5af8b844e3709b5d21f78687e7 /scheme/guile/geiser/modules.scm
parent64ba8a37a52e1b07605915931825de399cb5646a (diff)
downloadgeiser-guile-4bbe14d551f06608a9df68b4270c5d8b3fc3eb97.tar.gz
geiser-guile-4bbe14d551f06608a9df68b4270c5d8b3fc3eb97.tar.bz2
Guile: excluding anonymous module names from completion.
Diffstat (limited to 'scheme/guile/geiser/modules.scm')
-rw-r--r--scheme/guile/geiser/modules.scm17
1 files changed, 10 insertions, 7 deletions
diff --git a/scheme/guile/geiser/modules.scm b/scheme/guile/geiser/modules.scm
index 15b9737..e59bbd2 100644
--- a/scheme/guile/geiser/modules.scm
+++ b/scheme/guile/geiser/modules.scm
@@ -66,14 +66,17 @@
(submodules (resolve-module '() #f)))
(define (all-modules)
- (let ((guile (resolve-module '(guile))))
+ (define (not-anon m) (not (string-match "^[(]#[{]" m)))
+ (let* ((guile (resolve-module '(guile)))
+ (roots (remove (lambda (m) (eq? m guile)) (root-modules))))
(cons "(guile)"
- (apply append
- (map (lambda (r)
- (map (lambda (m)
- (format "~A" (module-name m)))
- (all-child-modules r '())))
- (remove (lambda (m) (eq? m guile)) (root-modules)))))))
+ (filter not-anon
+ (apply append
+ (map (lambda (r)
+ (map (lambda (m)
+ (format "~A" (module-name m)))
+ (all-child-modules r '())))
+ roots))))))
(define (all-child-modules mod seen)
(let ((cs (filter (lambda (m) (not (member m seen))) (submodules mod))))