From da22a526c1f683a90bb60840d05a6bb5f3a74ffe Mon Sep 17 00:00:00 2001 From: John Whitbeck Date: Fri, 3 Nov 2017 02:08:21 +0100 Subject: Support Chicken Scheme apropos =>2.3.0 Chicken Scheme's apropos egg changed the identifiers in the return value of the `apropos-information-list` from `module#name` to `(module . name)`. This commit adds support for the new identifiers. --- scheme/chicken/geiser/emacs.scm | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'scheme/chicken/geiser') diff --git a/scheme/chicken/geiser/emacs.scm b/scheme/chicken/geiser/emacs.scm index d31d801..d60cbb9 100644 --- a/scheme/chicken/geiser/emacs.scm +++ b/scheme/chicken/geiser/emacs.scm @@ -244,8 +244,9 @@ '(symbol-information-list) (lambda () (map (lambda (lst) - (let-values (((name module) (remove-internal-name-mangling (car lst)))) - (append (list name module) (cdr lst)))) + (let* ((module (if (eq? (string->symbol "") (caar lst)) #f (symbol->string (caar lst)))) + (name (symbol->string (cdar lst)))) + (append (list name module) (cdr lst)))) (apropos-information-list "" #:macros? #t))))) (define (find-symbol-information prefix) @@ -276,14 +277,6 @@ (file-write (debug-log) (with-all-output-to-string (lambda () (write form) (newline)))) (file-write (debug-log) "\n"))) - (define (remove-internal-name-mangling sym) - (let* ((sym (symbol->string sym)) - (octothorpe-index (string-index-right sym #\#))) - (if octothorpe-index - (values (substring/shared sym (add1 octothorpe-index)) - (substring/shared sym 0 octothorpe-index)) - (values sym #f)))) - (define (string-has-prefix? s prefix) (cond ((= 0 (string-length prefix)) #t) -- cgit v1.2.3