1 |
@c -*-texinfo-*- |
@c -*-texinfo-*- |
2 |
@c This is part of the GNU Emacs Lisp Reference Manual. |
@c This is part of the GNU Emacs Lisp Reference Manual. |
3 |
@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999 |
@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999 |
4 |
@c Free Software Foundation, Inc. |
@c Free Software Foundation, Inc. |
5 |
@c See the file elisp.texi for copying conditions. |
@c See the file elisp.texi for copying conditions. |
6 |
@setfilename ../info/lists |
@setfilename ../info/lists |
7 |
@node Lists, Sequences Arrays Vectors, Strings and Characters, Top |
@node Lists, Sequences Arrays Vectors, Strings and Characters, Top |
498 |
It is new in Emacs 21. |
It is new in Emacs 21. |
499 |
|
|
500 |
@example |
@example |
501 |
(setq l '(a b)) |
(setq l '(a b)) |
502 |
@result{} (a b) |
@result{} (a b) |
503 |
(push 'c l) |
(push 'c l) |
504 |
@result{} (c a b) |
@result{} (c a b) |
738 |
@cindex destructive list operations |
@cindex destructive list operations |
739 |
|
|
740 |
You can modify the @sc{car} and @sc{cdr} contents of a cons cell with the |
You can modify the @sc{car} and @sc{cdr} contents of a cons cell with the |
741 |
primitives @code{setcar} and @code{setcdr}. We call these ``destructive'' |
primitives @code{setcar} and @code{setcdr}. We call these ``destructive'' |
742 |
operations because they change existing list structure. |
operations because they change existing list structure. |
743 |
|
|
744 |
@cindex CL note---@code{rplaca} vrs @code{setcar} |
@cindex CL note---@code{rplaca} vrs @code{setcar} |