summaryrefslogtreecommitdiff
path: root/scheme/chicken
diff options
context:
space:
mode:
authorDan Leslie <dan@ironoxide.ca>2015-12-05 08:13:08 -0800
committerDan Leslie <dan@ironoxide.ca>2015-12-05 08:13:08 -0800
commitd4a2f79a611cfef41dce1a035d281c62a0d9d8bf (patch)
tree3b0974fb9b1ccf347127b3f45a85762f4dd612bc /scheme/chicken
parent23c3462311d0fd3da0bd2ffb924f237c620c80be (diff)
downloadgeiser-guile-d4a2f79a611cfef41dce1a035d281c62a0d9d8bf.tar.gz
geiser-guile-d4a2f79a611cfef41dce1a035d281c62a0d9d8bf.tar.bz2
Minor changes to help with debugging completions
Diffstat (limited to 'scheme/chicken')
-rw-r--r--scheme/chicken/geiser/emacs.scm16
1 files changed, 10 insertions, 6 deletions
diff --git a/scheme/chicken/geiser/emacs.scm b/scheme/chicken/geiser/emacs.scm
index 062e2a7..377c4d3 100644
--- a/scheme/chicken/geiser/emacs.scm
+++ b/scheme/chicken/geiser/emacs.scm
@@ -223,10 +223,13 @@
(define (memoize tag thunk)
(let ((table (memo)))
(if (hash-table-exists? table tag)
- (hash-table-ref table tag)
(begin
+ (write-to-log '[[Cache Hit]])
+ (hash-table-ref table tag))
+ (begin
+ (write-to-log '[[Cache Miss]])
(hash-table-set! table tag (thunk))
- (memoize tag thunk)))))
+ (hash-table-ref table tag)))))
(define debug-log (make-parameter #f))
(define (write-to-log form)
@@ -562,10 +565,11 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define (geiser-completions prefix . rest)
- (let ((prefix (->string prefix))
- (unfiltered (map remove-internal-name-mangling
- (apropos-list prefix #:macros? #t))))
- (filter (cut string-has-prefix? <> prefix) unfiltered)))
+ (let ((prefix (->string prefix)))
+ (filter
+ (cut string-has-prefix? <> prefix)
+ (map remove-internal-name-mangling
+ (apropos-list prefix #:macros? #t)))))
(define (geiser-module-completions prefix . rest)
(let ((prefix (->string prefix)))