[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 5a598fa: * lisp/subr.el (combine-change-calls-1): Don't presume i
From: |
Stefan Monnier |
Subject: |
master 5a598fa: * lisp/subr.el (combine-change-calls-1): Don't presume integer args |
Date: |
Wed, 10 Feb 2021 16:40:48 -0500 (EST) |
branch: master
commit 5a598fa41491132758810649ddbb565d44142f76
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* 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 6573090..eb28728 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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 5a598fa: * lisp/subr.el (combine-change-calls-1): Don't presume integer args,
Stefan Monnier <=