Function: type-of

type-of is a function defined in data.c.

Signature

(type-of OBJECT)

Documentation

Return a symbol representing the type of OBJECT.

The symbol returned names the object's basic type; for example, (type-of 1) returns integer. Contrary to cl-type-of, the returned type is not always the most precise type possible, because instead this function tries to preserve compatibility with the return value of previous Emacs versions.

View in manual

Probably introduced at or before Emacs version 19.29.

Aliases

soap-type-of

Source Code

// Defined in /usr/src/emacs/src/data.c
{
  return SYMBOLP (object)    ? Qsymbol
         : INTEGERP (object) ? Qinteger
         : SUBRP (object)    ? Qsubr
         : Fcl_type_of (object);
}