summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rw-r--r--share/txr/stdlib/struct.tl14
-rw-r--r--share/txr/stdlib/termios.tl8
2 files changed, 16 insertions, 6 deletions
diff --git a/share/txr/stdlib/struct.tl b/share/txr/stdlib/struct.tl
index 64cd2e76..2eecfbc7 100644
--- a/share/txr/stdlib/struct.tl
+++ b/share/txr/stdlib/struct.tl
@@ -223,11 +223,21 @@
:))
(((dw sym . args))
(if (eq dw 'dwim)
- ^[(slot ,obj ',(sys:check-slot form sym)) ,*args]
+ (let ((osym (gensym)))
+ (sys:check-slot form sym)
+ ^(slet ((,osym ,obj))
+ ,(if (and (plusp sys:compat) (<= sys:compat 251))
+ ^[(slot ,osym ',sym) ,*args]
+ ^[(slot ,osym ',sym) ,osym ,*args])))
:))
(((dw sym . args) . more)
(if (eq dw 'dwim)
- ^(qref [(slot ,obj ',(sys:check-slot form sym)) ,*args] ,*more)
+ (let ((osym (gensym)))
+ (sys:check-slot form sym)
+ ^(qref (slet ((,osym ,obj))
+ ,(if (and (plusp sys:compat) (<= sys:compat 251))
+ ^[(slot ,osym ',sym) ,*args]
+ ^[(slot ,osym ',sym) ,osym ,*args])) ,*more))
:))
(((sym . args))
(let ((osym (gensym)))
diff --git a/share/txr/stdlib/termios.tl b/share/txr/stdlib/termios.tl
index 93fcc958..5d2423dc 100644
--- a/share/txr/stdlib/termios.tl
+++ b/share/txr/stdlib/termios.tl
@@ -56,15 +56,15 @@
(if (boundp 'iexten)
tio.(clear-lflags iexten))
tio.(set-cflags cs8)
- (set tio.[cc vmin] 1)
- (set tio.[cc vtime] 0))
+ (set [tio.cc vmin] 1)
+ (set [tio.cc vtime] 0))
(defmeth termios go-cbreak (tio)
tio.(clear-iflags icrnl)
tio.(clear-lflags icanon)
tio.(set-lflags isig)
- (set tio.[cc vmin] 1)
- (set tio.[cc vtime] 0))
+ (set [tio.cc vmin] 1)
+ (set [tio.cc vtime] 0))
(defmeth termios string-encode (tio)
(let ((*print-base* 16))