; -*- geiser-scheme-implementation:chibi; -*- (define (all-environment-exports environment prefix) (if environment (append (filter (lambda (identifier) (if (string=? prefix "") #t (string-contains identifier prefix))) (map symbol->string (env-exports environment))) (all-environment-exports (env-parent environment) prefix)) '())) (define (geiser:completions prefix . rest) rest (sort (all-environment-exports (current-environment) prefix) string-ci A chibi implementation of the standard geiser's location-making ;;> subrouting. \var{file} is a string representing file name with path, ;;> \var{line} is the line number starting from 0 (scheme way). (define (make-location file line) (list (cons "file" (if (string? file) file '())) (cons "line" (if (number? line) (+ 1 line) '())))) ;TODO: (define (geiser:symbol-location) ; implement this method in order to make ; xref work better in Chibi. For reference, see [[geiser:module-location]] ;;> A function to find the file where the symbol ;;> \var{symbol-representing-module} is defined. (define (geiser:module-location symbol-representing-module) (make-location (find-module-file (module-name->file (module-name (find-module symbol-representing-module)))) 0 ) )