* module/language/elisp/runtime/subrs.scm (setcar, setcdr): Allow
setting the car or cdr of `nil' to `nil'.
Signed-off-by: Andy Wingo <wingo@pobox.com>
(built-in-func setcar
(lambda (cell val)
- (prim set-car! cell val)
+ (if (and (null? cell) (null? val))
+ #nil
+ (prim set-car! cell val))
val))
(built-in-func setcdr
(lambda (cell val)
- (prim set-cdr! cell val)
+ (if (and (null? cell) (null? val))
+ #nil
+ (prim set-cdr! cell val))
val))
;;; Accessing symbol bindings for symbols known only at runtime.