cl-babel/babel — Issue #3: [PATCH] Fix babel to work with :invert readtable case
Author: jjkola
Created: 2012-01-17 16:08:30+00:00
State: open

Fix babel to work with :invert readtable case

Make symbol munging to use the correct case by using '#:~a-symbol-name syntax. Also fixed some refences to T when they should have been t.

Signed-off-by: Jyrki Jaakkola \

```diff
diff --git a/src/enc-unicode.lisp b/src/enc-unicode.lisp
index 1a8375b..e66133b 100644
--- a/src/enc-unicode.lisp
+++ b/src/enc-unicode.lisp
@@ -520,9 +520,9 @@ code points for each invalid byte."
(check-type name keyword)
(let ((swap-var (gensym "SWAP"))
(code-point-counter-name
- (intern (format nil "~a-CODE-POINT-COUNTER" name)))
- (encoder-name (intern (format nil "~a-ENCODER" name)))
- (decoder-name (intern (format nil "~a-DECODER" name))))
+ (intern (format nil (string '#:~a-code-point-counter) (string name))))
+ (encoder-name (intern (format nil (string '#:~a-encoder) (string name))))
+ (decoder-name (intern (format nil (string '#:~a-decoder) (string name)))))
(labels ((make-bom-check-form (end start getter seq)
(if (null endianness)
``((,',swap-var
@@ -691,11 +691,11 @@ written in big-endian byte-order without a leading byte-order mark."
(check-type endianness (or null (eql :le) (eql :be)))
(let ((swap-var (gensym "SWAP"))
(code-point-counter-name
- (intern (format nil "~a-CODE-POINT-COUNTER" name)))
+ (intern (format nil (string '#:~a-code-point-counter) (string name))))
(encoder-name
- (intern (format nil "~a-ENCODER" name)))
+ (intern (format nil (string '#:~a-encoder) (string name))))
(decoder-name
- (intern (format nil "~a-DECODER" name))))
+ (intern (format nil (string '#:~a-decoder) (string name)))))
(labels ((make-bom-check-form (end start getter src)
(if (null endianness)
``(when (not (zerop (- ,,end ,,start)))
@@ -703,8 +703,8 @@ written in big-endian byte-order without a leading byte-order mark."
(#.+byte-order-mark-code+
(incf ,,start ,',bytes) nil)
(#.+swapped-byte-order-mark-code-32+
- (incf ,,start ,',bytes) T)
- (T #+little-endian T)))
+ (incf ,,start ,',bytes) t)
+ (t #+little-endian t)))
'()))
(make-setter-form (setter code dest di)
``(,,setter ,,code ,,dest ,,di ,',bytes
```