Next: , Up: Evaluate Emacs Lisp Expressions   [Index]


F.1.1 Eval Buffer

(eval-buffer)

Execute the accessible portion of current buffer as Lisp code. You can use ‘C-x n n’ to limit the part of buffer to be evaluated.

When called from a Lisp program (i.e., not interactively), this function accepts up to five optional arguments:

BUFFER

the buffer to evaluate (buffer or srtring) (current buffer if ’nil’)

PRINTFLAG

controls printing of output by output functions;

  • ’nil’ means discard
  • ’t’ means print
FILENAME

the file name to use for ’load-history’

UNIBYTE

if non-’nil’, specifies ’load-convert-to-unibyte’

DO-ALLOW-PRINT

if non-’nil’, output functions should work normally; output is displayed in echo area.

It will heed ‘-*- lexical-binding: t -*-’ setting in heading; otherwise, the buffer will be evaluated without lexical binding.