Function: prin1

prin1 is a function defined in print.c.

Signature

(prin1 OBJECT &optional PRINTCHARFUN)

Documentation

Output the printed representation of OBJECT, any Lisp object.

Quoting characters are printed when needed to make output that read can handle, whenever this is possible. For complex objects, the behavior is controlled by print-level and print-length, which see.

OBJECT is any of the Lisp data types: a number, a string, a symbol, a list, a buffer, a window, a frame, etc.

A printed representation of an object is text which describes that object.

Optional argument PRINTCHARFUN is the output stream, which can be one of these:

   - a buffer, in which case output is inserted into that buffer at point;
   - a marker, in which case output is inserted at marker's position;
   - a function, in which case that function is called once for each
     character of OBJECT's printed representation;
   - a symbol, in which case that symbol's function definition is called; or
   - t, in which case the output is displayed in the echo area.

If PRINTCHARFUN is omitted, the value of standard-output (which see) is used instead.

Probably introduced at or before Emacs version 16.

Aliases

cust-print-original-prin1

Source Code

// Defined in /usr/src/emacs/src/print.c
{
  if (NILP (printcharfun))
    printcharfun = Vstandard_output;
  PRINTPREPARE;
  print (object, printcharfun, 1);
  PRINTFINISH;
  return object;
}