[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#25599: Why edit markers after insert?

From: Andreas Schwab
Subject: bug#25599: Why edit markers after insert?
Date: Wed, 08 Mar 2017 18:39:23 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

On Mär 08 2017, nitish chandra <address@hidden> wrote:

> In primitive-undo in simple.el, aroud line 2550 (in master) we adjust the
> markers after the insertion.
> (dolist (adj valid-marker-adjustments)
>                (set-marker (car adj)
>                            (- (car adj) (cdr adj))))
> Why is this needed? Won't insert take care of adjusting the markers?

Only marker originally pointing inside the deleted region were recorded
here, and this is to make sure they regain their previous position after
the reinsertion.


Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

reply via email to

[Prev in Thread] Current Thread [Next in Thread]