Function: append

append is a function defined in fns.c.

Signature

(append &rest SEQUENCES)

Documentation

Concatenate all the arguments and make the result a list.

The result is a list whose elements are the elements of all the arguments. Each argument may be a list, vector or string.

All arguments except the last argument are copied. The last argument is just used as the tail of the new list.

Other relevant functions are documented in the vector and list groups.

View in manual

Probably introduced at or before Emacs version 19.29.

Shortdoc

;; list
(append '("foo" "bar") '("zot"))
    => ("foo" "bar" "zot")
;; vector
(append [1 2] nil)
    => (1 2)

Aliases

-concat

Source Code

// Defined in /usr/src/emacs/src/fns.c
{
  if (nargs == 0)
    return Qnil;
  return concat_to_list (nargs - 1, args, args[nargs - 1]);
}