aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorTom Tromey2013-07-26 14:02:53 -0600
committerTom Tromey2013-07-26 14:02:53 -0600
commitcc231cbe45d27a1906d268fb72d3b4105a2e9c65 (patch)
treec011828e2a3a18e77eaa8849e3cccb805d798f42 /src/buffer.c
parentb34a529f177a6ea32da5cb1254f91bf9d71838db (diff)
parentfec9206062b420aca84f53d05a72c3ee43244022 (diff)
downloademacs-cc231cbe45d27a1906d268fb72d3b4105a2e9c65.tar.gz
emacs-cc231cbe45d27a1906d268fb72d3b4105a2e9c65.zip
merge from trunk
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 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. */)
611 611
612 /* Put this in the alist of all live buffers. */ 612 /* Put this in the alist of all live buffers. */
613 XSETBUFFER (buffer, b); 613 XSETBUFFER (buffer, b);
614 Vbuffer_alist = nconc2 (Vbuffer_alist, Fcons (Fcons (name, buffer), Qnil)); 614 Vbuffer_alist = nconc2 (Vbuffer_alist, list1 (Fcons (name, buffer)));
615 /* And run buffer-list-update-hook. */ 615 /* And run buffer-list-update-hook. */
616 if (!NILP (Vrun_hooks)) 616 if (!NILP (Vrun_hooks))
617 call1 (Vrun_hooks, Qbuffer_list_update_hook); 617 call1 (Vrun_hooks, Qbuffer_list_update_hook);
@@ -822,7 +822,7 @@ CLONE nil means the indirect buffer's state is reset to default values. */)
822 822
823 /* Put this in the alist of all live buffers. */ 823 /* Put this in the alist of all live buffers. */
824 XSETBUFFER (buf, b); 824 XSETBUFFER (buf, b);
825 Vbuffer_alist = nconc2 (Vbuffer_alist, Fcons (Fcons (name, buf), Qnil)); 825 Vbuffer_alist = nconc2 (Vbuffer_alist, list1 (Fcons (name, buf)));
826 826
827 bset_mark (b, Fmake_marker ()); 827 bset_mark (b, Fmake_marker ());
828 828
@@ -2207,14 +2207,19 @@ ends when the current command terminates. Use `switch-to-buffer' or
2207 return buffer; 2207 return buffer;
2208} 2208}
2209 2209
2210void
2211restore_buffer (Lisp_Object buffer_or_name)
2212{
2213 Fset_buffer (buffer_or_name);
2214}
2215
2210/* Set the current buffer to BUFFER provided if it is alive. */ 2216/* Set the current buffer to BUFFER provided if it is alive. */
2211 2217
2212Lisp_Object 2218void
2213set_buffer_if_live (Lisp_Object buffer) 2219set_buffer_if_live (Lisp_Object buffer)
2214{ 2220{
2215 if (BUFFER_LIVE_P (XBUFFER (buffer))) 2221 if (BUFFER_LIVE_P (XBUFFER (buffer)))
2216 set_buffer_internal (XBUFFER (buffer)); 2222 set_buffer_internal (XBUFFER (buffer));
2217 return Qnil;
2218} 2223}
2219 2224
2220DEFUN ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only, 2225DEFUN ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only,