1157 |
(every |
(every |
1158 |
#'(lambda (x) |
#'(lambda (x) |
1159 |
(let ((y (copy-symbol x))) |
(let ((y (copy-symbol x))) |
1160 |
(and (symbolp y) |
(and (null (symbol-plist y)) |
1161 |
|
(symbolp y) |
1162 |
(not (boundp y)) |
(not (boundp y)) |
1163 |
(not (fboundp y)) |
(not (fboundp y)) |
1164 |
(null (symbol-package y)) |
(null (symbol-package y)) |
1165 |
(equal (symbol-name x) (symbol-name y)) |
(string= (symbol-name x) (symbol-name y)) |
|
(null (symbol-plist y)) |
|
1166 |
(symbolp (copy-symbol y)) |
(symbolp (copy-symbol y)) |
1167 |
))) |
))) |
1168 |
'(nil t a b |a| |123|)))) |
'(nil t a b |a| |123|)))) |
1177 |
(every |
(every |
1178 |
#'(lambda (x) |
#'(lambda (x) |
1179 |
(let ((y (copy-symbol x t))) |
(let ((y (copy-symbol x t))) |
1180 |
(and (symbolp y) |
(and |
1181 |
(if (boundp x) |
(equal (symbol-plist y) (symbol-plist x)) |
1182 |
(boundp y) |
(symbolp y) |
1183 |
(not (boundp y))) |
(if (boundp x) |
1184 |
(not (fboundp y)) |
(boundp y) |
1185 |
(null (symbol-package y)) |
(not (boundp y))) |
1186 |
(equal (symbol-name x) (symbol-name y)) |
(not (fboundp y)) |
1187 |
(equal (symbol-plist y) (symbol-plist x)) |
(null (symbol-package y)) |
1188 |
))) |
(string= (symbol-name x) (symbol-name y)) |
1189 |
|
))) |
1190 |
'(nil t a b |foo| |a| |123|))))) |
'(nil t a b |foo| |a| |123|))))) |
1191 |
(error (c) c)) |
(error (c) c)) |
1192 |
t) |
t) |
1200 |
(every |
(every |
1201 |
#'(lambda (x) |
#'(lambda (x) |
1202 |
(let ((y (copy-symbol x t))) |
(let ((y (copy-symbol x t))) |
1203 |
(and (symbolp y) |
(and |
1204 |
(if (boundp x) |
(eql (length (symbol-plist y)) |
1205 |
(eq (symbol-value x) |
(length (symbol-plist x))) |
1206 |
(symbol-value y)) |
;; Is a list copy |
1207 |
(not (boundp y))) |
(every #'eq (symbol-plist y) (symbol-plist x)) |
1208 |
(not (fboundp y)) |
(symbolp y) |
1209 |
(null (symbol-package y)) |
(if (boundp x) |
1210 |
(equal (symbol-name x) (symbol-name y)) |
(eq (symbol-value x) |
1211 |
(eql (length (symbol-plist x)) |
(symbol-value y)) |
1212 |
(length (symbol-plist y))) |
(not (boundp y))) |
1213 |
(every #'eq (symbol-plist y) (symbol-plist x)) |
(not (fboundp y)) |
1214 |
))) |
(null (symbol-package y)) |
1215 |
|
(string= (symbol-name x) (symbol-name y)) |
1216 |
|
(eql (length (symbol-plist x)) |
1217 |
|
(length (symbol-plist y))) |
1218 |
|
))) |
1219 |
'(nil t a b |foo| |a| |123|))))) |
'(nil t a b |foo| |a| |123|))))) |
1220 |
(error (c) c)) |
(error (c) c)) |
1221 |
t) |
t) |
1234 |
|
|
1235 |
;; Gensym returns symbols with distinct print names |
;; Gensym returns symbols with distinct print names |
1236 |
(deftest gensym-2 |
(deftest gensym-2 |
1237 |
(equal (symbol-name (gensym)) |
(string= (symbol-name (gensym)) |
1238 |
(symbol-name (gensym))) |
(symbol-name (gensym))) |
1239 |
nil) |
nil) |
1240 |
|
|
1241 |
;; Gensym uses the *gensym-counter* special variable, |
;; Gensym uses the *gensym-counter* special variable, |