www.delorie.com/gnu/docs/emacs-lisp-intro/emacs-lisp-intro_87.html   search  
Buy the book!

Programming in Emacs Lisp

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.2 The Definition of insert-buffer

insert-buffer is yet another buffer-related function. This command copies another buffer into the current buffer. It is the reverse of append-to-buffer or copy-to-buffer, since they copy a region of text from the current buffer to another buffer.

In addition, this code illustrates the use of interactive with a buffer that might be read-only and the important distinction between the name of an object and the object actually referred to.

The Code for insert-buffer  
5.2.1 The Interactive Expression in insert-buffer  When you can read, but not write.
5.2.2 The Body of the insert-buffer Function  The body has an or and a let.
5.2.3 insert-buffer With an if Instead of an or  Using an if instead of an or.
5.2.4 The or in the Body  How the or expression works.
5.2.5 The let Expression in insert-buffer  Two save-excursion expressions.

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003