aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorJoakim Verona2013-07-20 01:44:36 +0200
committerJoakim Verona2013-07-20 01:44:36 +0200
commit759dbb1aebe68fb392f7ed53eba4b460ae6b83be (patch)
tree1becc0cc6d676589eb274cb2c457e4256e908010 /src/buffer.c
parent6c1769c85ecb61b40a1f9a3b56b61cdd6c1f8992 (diff)
parent3f5bef16fab0ba83cb2298f8137fec831af1aec4 (diff)
downloademacs-759dbb1aebe68fb392f7ed53eba4b460ae6b83be.tar.gz
emacs-759dbb1aebe68fb392f7ed53eba4b460ae6b83be.zip
Merge branch 'trunk' into xwidget
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 44371144687..063e02e8f6c 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -617,7 +617,7 @@ even if it is dead. The return value is never nil. */)
617 617
618 /* Put this in the alist of all live buffers. */ 618 /* Put this in the alist of all live buffers. */
619 XSETBUFFER (buffer, b); 619 XSETBUFFER (buffer, b);
620 Vbuffer_alist = nconc2 (Vbuffer_alist, Fcons (Fcons (name, buffer), Qnil)); 620 Vbuffer_alist = nconc2 (Vbuffer_alist, list1 (Fcons (name, buffer)));
621 /* And run buffer-list-update-hook. */ 621 /* And run buffer-list-update-hook. */
622 if (!NILP (Vrun_hooks)) 622 if (!NILP (Vrun_hooks))
623 call1 (Vrun_hooks, Qbuffer_list_update_hook); 623 call1 (Vrun_hooks, Qbuffer_list_update_hook);
@@ -828,7 +828,7 @@ CLONE nil means the indirect buffer's state is reset to default values. */)
828 828
829 /* Put this in the alist of all live buffers. */ 829 /* Put this in the alist of all live buffers. */
830 XSETBUFFER (buf, b); 830 XSETBUFFER (buf, b);
831 Vbuffer_alist = nconc2 (Vbuffer_alist, Fcons (Fcons (name, buf), Qnil)); 831 Vbuffer_alist = nconc2 (Vbuffer_alist, list1 (Fcons (name, buf)));
832 832
833 bset_mark (b, Fmake_marker ()); 833 bset_mark (b, Fmake_marker ());
834 834
@@ -2215,14 +2215,19 @@ ends when the current command terminates. Use `switch-to-buffer' or
2215 return buffer; 2215 return buffer;
2216} 2216}
2217 2217
2218void
2219restore_buffer (Lisp_Object buffer_or_name)
2220{
2221 Fset_buffer (buffer_or_name);
2222}
2223
2218/* Set the current buffer to BUFFER provided if it is alive. */ 2224/* Set the current buffer to BUFFER provided if it is alive. */
2219 2225
2220Lisp_Object 2226void
2221set_buffer_if_live (Lisp_Object buffer) 2227set_buffer_if_live (Lisp_Object buffer)
2222{ 2228{
2223 if (BUFFER_LIVE_P (XBUFFER (buffer))) 2229 if (BUFFER_LIVE_P (XBUFFER (buffer)))
2224 set_buffer_internal (XBUFFER (buffer)); 2230 set_buffer_internal (XBUFFER (buffer));
2225 return Qnil;
2226} 2231}
2227 2232
2228DEFUN ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only, 2233DEFUN ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only,