diff options
author | Tom Tromey <tromey@redhat.com> | 2013-07-26 14:02:53 -0600 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-07-26 14:02:53 -0600 |
commit | cc231cbe45d27a1906d268fb72d3b4105a2e9c65 (patch) | |
tree | c011828e2a3a18e77eaa8849e3cccb805d798f42 /src/buffer.c | |
parent | b34a529f177a6ea32da5cb1254f91bf9d71838db (diff) | |
parent | fec9206062b420aca84f53d05a72c3ee43244022 (diff) | |
download | emacs-cc231cbe45d27a1906d268fb72d3b4105a2e9c65.tar.gz |
merge from trunk
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, |