From: Stefan Monnier Date: Wed, 10 Feb 2021 21:39:53 +0000 (-0500) Subject: * lisp/subr.el (combine-change-calls-1): Don't presume integer args X-Git-Tag: emacs-28.0.90~3815 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5a598fa41491132758810649ddbb565d44142f76;p=emacs.git * 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. --- 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)