aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.h
diff options
context:
space:
mode:
authorDmitry Antipov2012-08-28 10:20:08 +0400
committerDmitry Antipov2012-08-28 10:20:08 +0400
commit66322887059e1f2711e07def5eff661281cee855 (patch)
treeedf1ef336402c53b08c69f2b0d92c2391a2549d5 /src/buffer.h
parenta3d794a153425b09a0185c660926c241d13e0f2c (diff)
downloademacs-66322887059e1f2711e07def5eff661281cee855.tar.gz
emacs-66322887059e1f2711e07def5eff661281cee855.zip
Always use set_buffer_if_live to restore original buffer at unwind.
* buffer.h (record_unwind_current_buffer): New function. * bytecode.c, dispnew.c, editfns.c, fileio.c, fns.c, insdel.c: * keyboard.c, keymap.c, minibuf.c, print.c, process.c, textprop.c: * undo.c, window.c: Adjust users. * buffer.c (set_buffer_if_live): Fix comment.
Diffstat (limited to 'src/buffer.h')
-rw-r--r--src/buffer.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/buffer.h b/src/buffer.h
index 929da3c4791..3acf1423816 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -1038,6 +1038,15 @@ set_buffer_internal (struct buffer *b)
1038 set_buffer_internal_1 (b); 1038 set_buffer_internal_1 (b);
1039} 1039}
1040 1040
1041/* Arrange to go back to the original buffer after the next
1042 call to unbind_to if the original buffer is still alive. */
1043
1044BUFFER_INLINE void
1045record_unwind_current_buffer (void)
1046{
1047 record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ());
1048}
1049
1041/* Get overlays at POSN into array OVERLAYS with NOVERLAYS elements. 1050/* Get overlays at POSN into array OVERLAYS with NOVERLAYS elements.
1042 If NEXTP is non-NULL, return next overlay there. 1051 If NEXTP is non-NULL, return next overlay there.
1043 See overlay_at arg CHANGE_REQ for meaning of CHRQ arg. */ 1052 See overlay_at arg CHANGE_REQ for meaning of CHRQ arg. */