[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/geiser-racket 7cefe7f 074/191: No more interning in the sc
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/geiser-racket 7cefe7f 074/191: No more interning in the scheme reader |
Date: |
Sun, 1 Aug 2021 18:32:03 -0400 (EDT) |
branch: elpa/geiser-racket
commit 7cefe7fd6715be2632524315cc2c3b382c5d3aa2
Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
Commit: Jose Antonio Ortega Ruiz <jao@gnu.org>
No more interning in the scheme reader
We avoid using elisp's read for symbols, reading uninterned ones
instead. And then, we cannot use symbols as keys in responses from
scheme: we're using strings instead.
---
geiser/autodoc.rkt | 36 ++++++++++++++++++------------------
geiser/locations.rkt | 6 +++---
2 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/geiser/autodoc.rkt b/geiser/autodoc.rkt
index dea8f43..6e73271 100644
--- a/geiser/autodoc.rkt
+++ b/geiser/autodoc.rkt
@@ -40,11 +40,11 @@
(let* ([val (value sym (symbol-module sym))]
[sign (autodoc* sym)])
(and sign
- (list (cons 'signature (autodoc* sym #f))
- (cons 'docstring (docstring sym val sign))))))
+ (list (cons "signature" (autodoc* sym #f))
+ (cons "docstring" (docstring sym val sign))))))
(define (docstring sym val sign)
- (let* ([mod (assoc 'module (cdr sign))]
+ (let* ([mod (assoc "module" (cdr sign))]
[mod (if mod (cdr mod) "<unknown>")]
[id (namespace-symbol->identifier sym)]
[desc (if (identifier? id) (format "~%~%~a" (describe id sym)) "")])
@@ -118,26 +118,26 @@
[path (cdr loc)]
[sgns (and path (find-signatures path name id))]
[value (if (and extra sgns (not (list? sgns)))
- (list (cons 'value (val)))
+ (list (cons "value" (val)))
'())]
[mod (if (and extra sgns path)
- (list (cons 'module
+ (list (cons "module"
(module-path-name->name path)))
'())])
(and sgns
`(,id
- (name . ,name)
- (args ,@(if (list? sgns) (map format-signature sgns) '()))
+ ("name" . ,name)
+ ("args" ,@(if (list? sgns) (map format-signature sgns) '()))
,@value
,@mod)))))
(define (format-signature sign)
(if (signature? sign)
- `((required ,@(signature-required sign))
- (optional ,@(signature-optional sign)
- ,@(let ((rest (signature-rest sign)))
- (if rest (list "...") '())))
- (key ,@(signature-keys sign)))
+ `(("required" ,@(signature-required sign))
+ ("optional" ,@(signature-optional sign)
+ ,@(let ((rest (signature-rest sign)))
+ (if rest (list "...") '())))
+ ("key" ,@(signature-keys sign)))
'()))
(define signatures (make-hash))
@@ -281,21 +281,21 @@
(define (contracted id)
(let ([v (value id mod)])
(if (has-contract? v)
- (list id (cons 'info (contract-name (value-contract v))))
+ (list id (cons "info" (contract-name (value-contract v))))
(entry id))))
(define (entry id)
(let ((sign (eval `(,autodoc* ',id #f)
(module-spec->namespace mod #f #f))))
- (if sign (list id (cons 'signature sign)) (list id))))
+ (if sign (list id (cons "signature" sign)) (list id))))
(define (classify-ids ids)
(let loop ([ids ids] [procs '()] [vars '()])
(cond [(null? ids)
- `((procs ,@(map entry (reverse procs)))
- (vars ,@(map list (reverse vars))))]
+ `(("procs" ,@(map entry (reverse procs)))
+ ("vars" ,@(map list (reverse vars))))]
[(procedure? (value (car ids) mod))
(loop (cdr ids) (cons (car ids) procs) vars)]
[else (loop (cdr ids) procs (cons (car ids) vars))])))
(let-values ([(ids syn) (module-identifiers mod)])
`(,@(classify-ids ids)
- (syntax ,@(map contracted syn))
- (modules ,@(map list (or (submodules mod) '()))))))
+ ("syntax" ,@(map contracted syn))
+ ("modules" ,@(map list (or (submodules mod) '()))))))
diff --git a/geiser/locations.rkt b/geiser/locations.rkt
index 4715b8f..1ed4534 100644
--- a/geiser/locations.rkt
+++ b/geiser/locations.rkt
@@ -30,9 +30,9 @@
(cons sym #f))))
(define (make-location name path line)
- (list (cons 'name name)
- (cons 'file (if (path? path) (path->string path) '()))
- (cons 'line (or line '()))))
+ (list (cons "name" name)
+ (cons "file" (if (path? path) (path->string path) '()))
+ (cons "line" (or line '()))))
(define (symbol-location sym)
(let* ([loc (symbol-location* sym)]
- [nongnu] elpa/geiser-racket 4c3903a 063/191: Better module help, (continued)
- [nongnu] elpa/geiser-racket 4c3903a 063/191: Better module help, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 1f64738 066/191: Racket: showing submodules in module help, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 1f2bc48 070/191: Racket: more information in symbol documentation, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket cd7378b 089/191: Racket: indentation for all 'for' forms, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 41f65a1 076/191: Fixes for locals scanning, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket d0d80d8 079/191: Racket: no errors , entering an R5RS module, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket dc63508 081/191: Racket: use the proper interaction port for input (#32844), Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 12dc25e 077/191: Racket: ', enter "foo"' as a synonym of ', enter (file "foo")', Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 13dfcf3 075/191: Racket: #lang, require and provide as keywords, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket c5e7ea8 100/191: Little cleanups, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 7cefe7f 074/191: No more interning in the scheme reader,
Philip Kaludercic <=
- [nongnu] elpa/geiser-racket f9fc642 102/191: Racket: fix for enter!, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 5e2184b 103/191: racket: displaying images also during evaluations, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 81ecf42 118/191: More Racket for/* forms indentation from Diogo, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket b924983 108/191: Autoload cookies in geiser.el, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket a22f8e2 117/191: Indentation rule for match/values (Diogo F.S. Ramos), Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 3e306cf 112/191: Racket: indentation for `local'., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket b86cf1f 116/191: Configurable keyword case sensitivity, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket e4707d2 105/191: racket: autodoc for PLAI's define-type, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket 90c38d6 121/191: A better solution to the funky filename problem, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-racket cc2b8a3 126/191: Racket: fixing help when REPL is in a module, Philip Kaludercic, 2021/08/01