diff options
| author | Paul Eggert | 2018-03-30 14:23:55 -0700 |
|---|---|---|
| committer | Paul Eggert | 2018-03-30 14:26:26 -0700 |
| commit | 6f66a43d7ad6cada2b7dbb6d07efe36be1dc7ecb (patch) | |
| tree | 1a4fe997bc0d2997c3f7df516bba4331c3dccbbd /src/editfns.c | |
| parent | 96b8747d5c5d747af13fd84d8fe0308ef2a0ea7a (diff) | |
| download | emacs-6f66a43d7ad6cada2b7dbb6d07efe36be1dc7ecb.tar.gz emacs-6f66a43d7ad6cada2b7dbb6d07efe36be1dc7ecb.zip | |
Centralize Bug#30931 fix
* src/marker.c (detach_marker): New function.
* src/editfns.c (save_restriction_restore):
* src/insdel.c (signal_before_change): Use it.
Diffstat (limited to 'src/editfns.c')
| -rw-r--r-- | src/editfns.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/editfns.c b/src/editfns.c index 84de6792738..608304c09ad 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -3899,12 +3899,9 @@ save_restriction_restore (Lisp_Object data) | |||
| 3899 | 3899 | ||
| 3900 | buf->clip_changed = 1; /* Remember that the narrowing changed. */ | 3900 | buf->clip_changed = 1; /* Remember that the narrowing changed. */ |
| 3901 | } | 3901 | } |
| 3902 | /* This isn’t needed anymore, so don’t wait for GC. Do not call | 3902 | /* Detach the markers, and free the cons instead of waiting for GC. */ |
| 3903 | free_marker on XCAR (data) or XCDR (data), though, since | 3903 | detach_marker (XCAR (data)); |
| 3904 | record_marker_adjustments may have put them on the buffer’s | 3904 | detach_marker (XCDR (data)); |
| 3905 | undo list (Bug#30931). Just detach them instead. */ | ||
| 3906 | Fset_marker (XCAR (data), Qnil, Qnil); | ||
| 3907 | Fset_marker (XCDR (data), Qnil, Qnil); | ||
| 3908 | free_cons (XCONS (data)); | 3905 | free_cons (XCONS (data)); |
| 3909 | } | 3906 | } |
| 3910 | else | 3907 | else |