diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-06-16 23:05:16 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-06-16 23:05:16 +0200 |
commit | 11c2d580e6983eb9ac3261ba39924b82d2938573 (patch) | |
tree | 94b06a1fd16d8959e545c1bc27a9c8d164fbaa1d /geiser | |
parent | 503e2395bc245a1e3ec23f12563e91be6b28d041 (diff) | |
download | geiser-guile-11c2d580e6983eb9ac3261ba39924b82d2938573.tar.gz geiser-guile-11c2d580e6983eb9ac3261ba39924b82d2938573.tar.bz2 |
Guile: excluding anonymous module names from completion.
Diffstat (limited to 'geiser')
-rw-r--r-- | geiser/modules.scm | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/geiser/modules.scm b/geiser/modules.scm index 15b9737..e59bbd2 100644 --- a/geiser/modules.scm +++ b/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)))) |