From 7b0fea42f793d7b7f9fa9938b3c99b1f28323531 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Wed, 20 Oct 2021 02:42:31 +0200 Subject: [PATCH] Decrease size of undo entries * src/undo.c (record_delete): Remove the 'face' property from undo entries to save space. (Bug1501) --- src/undo.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/undo.c b/src/undo.c index 2db401ebc7..260cf792c7 100644 --- a/src/undo.c +++ b/src/undo.c @@ -164,6 +164,13 @@ record_delete (ptrdiff_t beg, Lisp_Object string, bool record_markers) { Lisp_Object sbeg; + /* Remove the `face' property to save space. (Bug1501) */ + if (!NILP (string)) + Fremove_list_of_text_properties (make_fixnum (0), + make_fixnum (SCHARS (string)), + CALLN (Flist, Qface), + string); + if (EQ (BVAR (current_buffer, undo_list), Qt)) return; -- 2.30.2