Function: car

car is a function defined in data.c.

Signature

(car LIST)

Documentation

Return the car of LIST. If LIST is nil, return nil.

Error if LIST is not nil and not a cons cell. See also car-safe.

See Info node (elisp)Cons Cells for a discussion of related basic Lisp concepts such as car, cdr, cons cell and list.

Other relevant functions are documented in the list group.

View in manual

Probably introduced at or before Emacs version 1.2.

Shortdoc

;; list
(car '(one two three))
    => one
  (car '(one . two))
    => one
  (car nil)
    => nil

Aliases

cl-first first (obsolete since 27.1) cmpl-prefix-entry-head quickurl-url-keyword button--area-button-string -first-item smie-op-left

Source Code

// Defined in /usr/src/emacs/src/data.c
{
  return CAR (list);
}