(lispref.info)Type Predicates


Next: Equality Predicates Prev: Window-System Types Up: Types of Lisp Object

Type Predicates
===============

   The Emacs Lisp interpreter itself does not perform type checking on
the actual arguments passed to functions when they are called.  It could
not do otherwise, since variables in Lisp are not declared to be of a
certain type, as they are in other programming languages.  It is
therefore up to the individual function to test whether each actual
argument belongs to a type that can be used by the function.

   All built-in functions do check the types of their actual arguments
when appropriate and signal a `wrong-type-argument' error if an
argument is of the wrong type.  For example, here is what happens if you
pass an argument to `+' which it cannot handle:

     (+ 2 'a)
          error--> Wrong type argument: integer-or-marker-p, a

   Many functions, called "type predicates", are provided to test
whether an object is a member of a given type.  (Following a convention
of long standing, the names of most Emacs Lisp predicates end in `p'.)

   Here is a table of predefined type predicates, in alphabetical order,
with references to further information.

`atom'
     Note: atom.

`arrayp'
     Note: arrayp.

`bufferp'
     Note: bufferp.

`byte-code-function-p'
     Note: byte-code-function-p.

`case-table-p'
     Note: case-table-p.

`char-or-string-p'
     Note: char-or-string-p.

`commandp'
     Note: commandp.

`consp'
     Note: consp.

`extentp'
     Note: extentp.

`floatp'
     Note: floatp.

`fontp'
     Note: fontp.

`integer-or-marker-p'
     Note: integer-or-marker-p.

`integerp'
     Note: integerp.

`keymapp'
     Note: keymapp.

`listp'
     Note: listp.

`live-screen-p'
     Note: live-screen-p.

`markerp'
     Note: markerp.

`natnump'
     Note: natnump.

`nlistp'
     Note: nlistp.

`numberp'
     Note: numberp.

`number-or-marker-p'
     Note: number-or-marker-p.

`pixelp'
     Note: pixelp.

`pixmapp'
     Note: pixmapp.

`processp'
     Note: processp.

`screenp'
     Note: screenp.

`sequencep'
     Note: sequencep.

`stringp'
     Note: stringp.

`subrp'
     Note: subrp.

`symbolp'
     Note: symbolp.

`syntax-table-p'
     Note: syntax-table-p.

`user-variable-p'
     Note: user-variable-p.

`vectorp'
     Note: vectorp.

`window-configuration-p'
     Note: window-configuration-p.

`windowp'
     Note: windowp.


automatically generated by info2www