summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2021-02-10 16:39:53 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2021-02-10 16:39:53 -0500
commit5a598fa41491132758810649ddbb565d44142f76 (patch)
tree63c48380f271a380b87c4b2420d1345286f23934 /lisp
parent29c47ac19a393d2544562fe8932bc4e1b6ddd7c9 (diff)
downloademacs-5a598fa41491132758810649ddbb565d44142f76.tar.gz
emacs-5a598fa41491132758810649ddbb565d44142f76.tar.bz2
emacs-5a598fa41491132758810649ddbb565d44142f76.zip
* 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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/subr.el2
1 files changed, 2 insertions, 0 deletions
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)