diff options
| author | Paul Eggert | 2018-06-07 18:53:27 -0700 |
|---|---|---|
| committer | Paul Eggert | 2018-06-07 19:11:49 -0700 |
| commit | a0aa1d4ecc123d652285ef10ea62ed55c6c118d6 (patch) | |
| tree | c56177683a5a552e17eb8ce7ed27256507361b60 /src/eval.c | |
| parent | a0641286f6e58f4dca4221caa6dd559bfacea699 (diff) | |
| download | emacs-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/eval.c')
| -rw-r--r-- | src/eval.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c index 90d8c335185..86011a234c0 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -3415,6 +3415,12 @@ record_unwind_protect_int (void (*function) (int), int arg) | |||
| 3415 | } | 3415 | } |
| 3416 | 3416 | ||
| 3417 | void | 3417 | void |
| 3418 | record_unwind_protect_excursion (void) | ||
| 3419 | { | ||
| 3420 | record_unwind_protect (save_excursion_restore, save_excursion_save ()); | ||
| 3421 | } | ||
| 3422 | |||
| 3423 | void | ||
| 3418 | record_unwind_protect_void (void (*function) (void)) | 3424 | record_unwind_protect_void (void (*function) (void)) |
| 3419 | { | 3425 | { |
| 3420 | specpdl_ptr->unwind_void.kind = SPECPDL_UNWIND_VOID; | 3426 | specpdl_ptr->unwind_void.kind = SPECPDL_UNWIND_VOID; |