Function: setcdr

setcdr is a function defined in data.c.

Signature

(setcdr CELL NEWCDR)

Documentation

Set the cdr of CELL to be NEWCDR. Returns NEWCDR.

Other relevant functions are documented in the list group.

View in manual

Probably introduced at or before Emacs version 1.6.

Shortdoc

;; list
(setcdr list (list c))
    => '(c)

Aliases

rplacd

Source Code

// Defined in /usr/src/emacs/src/data.c
{
  CHECK_CONS (cell);
  XSETCDR (cell, newcdr);
  return newcdr;
}