Jethro's Braindump

Elisp: Buffer-passing Style

tags
Emacs Lisp

Rather than have the callee instantiate the buffer, the caller instantiates the buffer, and passes it implicitly as the current buffer. The callee fills it with something. The caller should use something like with-temp-buffer so that the buffer has a clean life-cycle, fully managed by the caller (Source).

Links to this note