Permalink
Browse files

Suppress vertical bars and colon when printing keywords

  • Loading branch information...
1 parent 5d29ce3 commit 0e92c99d93f722db7b61c30a08222b35a264bd30 @feeley feeley committed Mar 7, 2014
File renamed without changes.
View
@@ -3,4 +3,4 @@
*/
#define ___STAMP_YMD 20140307
-#define ___STAMP_HMS 4725
+#define ___STAMP_HMS 31443
View
@@ -8346,15 +8346,16 @@
(else
(if (or (##not uninterned?)
(##wr-stamp we obj))
- (begin
- (if uninterned?
- (##wr-str we "#:"))
- (let ((str (##symbol->string obj)))
- (if (case (macro-writeenv-style we)
- ((display print) #t)
- (else (##not (##escape-symbol? we str))))
- (##wr-str we str)
- (##wr-escaped-string we str #\|)))))))))
+ (let ((str (##symbol->string obj)))
+ (case (macro-writeenv-style we)
+ ((display print)
+ (##wr-str we str))
+ (else
+ (if uninterned?
+ (##wr-str we "#:"))
+ (if (##not (##escape-symbol? we str))
+ (##wr-str we str)
+ (##wr-escaped-string we str #\|))))))))))
(define-prim (##escape-symbol? we str)
(let ((n (##string-length str)))
@@ -8401,23 +8402,25 @@
(else
(if (or (##not uninterned?)
(##wr-stamp we obj))
- (begin
- (if uninterned?
- (##wr-str we "#:"))
- (let* ((str
- (##keyword->string obj))
- (keywords-allowed?
- (macro-readtable-keywords-allowed?
- (macro-writeenv-readtable we))))
- (if (##eq? keywords-allowed? 'prefix)
- (##wr-ch we #\:))
- (if (case (macro-writeenv-style we)
- ((display) #t)
- (else (##not (##escape-keyword? we str))))
- (##wr-str we str)
- (##wr-escaped-string we str #\|))
- (if (##not (##eq? keywords-allowed? 'prefix))
- (##wr-ch we #\:)))))))))
+ (let* ((str
+ (##keyword->string obj))
+ (keywords-allowed?
+ (macro-readtable-keywords-allowed?
+ (macro-writeenv-readtable we))))
+ (case (macro-writeenv-style we)
+ ((display print)
+ (##wr-str we str))
+ (else
+ (if uninterned?
+ (##wr-str we "#:"))
+ (if (##eq? keywords-allowed? 'prefix)
+ (##wr-ch we #\:))
+ (if (##not (##escape-keyword? we str))
+ (##wr-str we str)
+ (begin
+ (##wr-escaped-string we str #\|)
+ (if (##not (##eq? keywords-allowed? 'prefix))
+ (##wr-ch we #\:))))))))))))
(define-prim (##escape-keyword? we str)
(let ((n (##string-length str)))

0 comments on commit 0e92c99

Please sign in to comment.