From 5a598fa41491132758810649ddbb565d44142f76 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 10 Feb 2021 16:39:53 -0500 Subject: [PATCH] * lisp/subr.el (combine-change-calls-1): Don't presume integer args This avoids problems where the `after-change-functions` end up called with the new length rather than the old length. --- lisp/subr.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/subr.el b/lisp/subr.el index 6573090ebe3..eb287287608 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -4330,6 +4330,8 @@ the specified region. It must not change Additionally, the buffer modifications of BODY are recorded on the buffer's undo list as a single (apply ...) entry containing the function `undo--wrap-and-run-primitive-undo'." + (if (markerp beg) (setq beg (marker-position beg))) + (if (markerp end) (setq end (marker-position end))) (let ((old-bul buffer-undo-list) (end-marker (copy-marker end t)) result) -- 2.39.2