aboutsummaryrefslogtreecommitdiffstats
path: root/src/editfns.c
diff options
context:
space:
mode:
authorPaul Eggert2018-06-07 18:53:27 -0700
committerPaul Eggert2018-06-07 19:11:49 -0700
commita0aa1d4ecc123d652285ef10ea62ed55c6c118d6 (patch)
treec56177683a5a552e17eb8ce7ed27256507361b60 /src/editfns.c
parenta0641286f6e58f4dca4221caa6dd559bfacea699 (diff)
downloademacs-a0aa1d4ecc123d652285ef10ea62ed55c6c118d6.tar.gz
emacs-a0aa1d4ecc123d652285ef10ea62ed55c6c118d6.zip
New function record_unwind_protect_excursion
This simplifies callers a bit, and will simplify future changes. * src/eval.c (record_unwind_protect_excursion): New function. * src/buffer.c (Fkill_buffer): * src/bytecode.c (exec_byte_code): * src/editfns.c (Fsave_excursion, Freplace_buffer_contents): * src/lread.c (readevalloop, Feval_buffer): * src/window.c (scroll_command): Use it.
Diffstat (limited to 'src/editfns.c')
-rw-r--r--src/editfns.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/editfns.c b/src/editfns.c
index 608304c09ad..2377ceb18af 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -1068,7 +1068,7 @@ usage: (save-excursion &rest BODY) */)
1068 register Lisp_Object val; 1068 register Lisp_Object val;
1069 ptrdiff_t count = SPECPDL_INDEX (); 1069 ptrdiff_t count = SPECPDL_INDEX ();
1070 1070
1071 record_unwind_protect (save_excursion_restore, save_excursion_save ()); 1071 record_unwind_protect_excursion ();
1072 1072
1073 val = Fprogn (args); 1073 val = Fprogn (args);
1074 return unbind_to (count, val); 1074 return unbind_to (count, val);
@@ -3242,7 +3242,7 @@ buffer stay intact. */)
3242 3242
3243 Fundo_boundary (); 3243 Fundo_boundary ();
3244 ptrdiff_t count = SPECPDL_INDEX (); 3244 ptrdiff_t count = SPECPDL_INDEX ();
3245 record_unwind_protect (save_excursion_restore, save_excursion_save ()); 3245 record_unwind_protect_excursion ();
3246 3246
3247 ptrdiff_t i = size_a; 3247 ptrdiff_t i = size_a;
3248 ptrdiff_t j = size_b; 3248 ptrdiff_t j = size_b;