mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-09 21:40:33 +02:00
allow (setcar nil nil)' and
(setcdr nil nil)'
* 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>
This commit is contained in:
parent
b7966c10ef
commit
b41a673d26
1 changed files with 6 additions and 2 deletions
|
@ -265,12 +265,16 @@
|
|||
|
||||
(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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue