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. If the last argument is not a list, this results in a dotted list.
As an exception, if all the arguments except the last are nil, and the last argument is not a list, the return value is that last argument unaltered, not a list.
Other relevant functions are documented in the vector and list groups.
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
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]);
}