diff options
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/buffer.c b/src/buffer.c index 19e3982a8a4..3ca1bd98b29 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -611,7 +611,7 @@ even if it is dead. The return value is never nil. */) /* Put this in the alist of all live buffers. */ XSETBUFFER (buffer, b); - Vbuffer_alist = nconc2 (Vbuffer_alist, Fcons (Fcons (name, buffer), Qnil)); + Vbuffer_alist = nconc2 (Vbuffer_alist, list1 (Fcons (name, buffer))); /* And run buffer-list-update-hook. */ if (!NILP (Vrun_hooks)) call1 (Vrun_hooks, Qbuffer_list_update_hook); @@ -822,7 +822,7 @@ CLONE nil means the indirect buffer's state is reset to default values. */) /* Put this in the alist of all live buffers. */ XSETBUFFER (buf, b); - Vbuffer_alist = nconc2 (Vbuffer_alist, Fcons (Fcons (name, buf), Qnil)); + Vbuffer_alist = nconc2 (Vbuffer_alist, list1 (Fcons (name, buf))); bset_mark (b, Fmake_marker ()); @@ -2207,14 +2207,19 @@ ends when the current command terminates. Use `switch-to-buffer' or return buffer; } +void +restore_buffer (Lisp_Object buffer_or_name) +{ + Fset_buffer (buffer_or_name); +} + /* Set the current buffer to BUFFER provided if it is alive. */ -Lisp_Object +void set_buffer_if_live (Lisp_Object buffer) { if (BUFFER_LIVE_P (XBUFFER (buffer))) set_buffer_internal (XBUFFER (buffer)); - return Qnil; } DEFUN ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only, |