Function: insert

insert is a function defined in editfns.c.

Signature

(insert &rest ARGS)

Documentation

Insert the arguments, either strings or characters, at point.

Point and after-insertion markers move forward to end up
 after the inserted text.
Any other markers at the point of insertion remain before the text.

If the current buffer is multibyte, unibyte strings are converted to multibyte for insertion (see string-make-multibyte). If the current buffer is unibyte, multibyte strings are converted to unibyte for insertion (see string-make-unibyte).

When operating on binary data, it may be necessary to preserve the original bytes of a unibyte string when inserting it into a multibyte buffer; to accomplish this, apply decode-coding-string with the no-conversion coding system to the string and insert the result.

Other relevant functions are documented in the buffer group.

View in manual

Probably introduced at or before Emacs version 17.

Shortdoc

;; buffer
(insert "This string will be inserted in the buffer\n")

Source Code

// Defined in /usr/src/emacs/src/editfns.c
{
  general_insert_function (insert, insert_from_string, 0, nargs, args);
  return Qnil;
}