Function: vector

vector is a function defined in alloc.c.

Signature

(vector &rest OBJECTS)

Documentation

Return a newly created vector with specified arguments as elements.

Allows any number of arguments, including zero.

Other relevant functions are documented in the vector group.

Probably introduced at or before Emacs version 19.20.

Shortdoc

;; vector
(vector 1 "b" 3)
    => [1 "b" 3]

Source Code

// Defined in /usr/src/emacs/src/alloc.c
{
  Lisp_Object val = make_uninit_vector (nargs);
  struct Lisp_Vector *p = XVECTOR (val);
  memcpy (p->contents, args, nargs * sizeof *args);
  return val;
}