[Top][All Lists]

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

bug#13122: save-excursion not saving point

From: Tino Calancha
Subject: bug#13122: save-excursion not saving point
Date: Sat, 4 May 2019 17:39:11 +0900 (JST)
User-agent: Alpine 2.20 (DEB 67 2015-01-07)

Saving the point, in the general case, would rely on unspecified behaviour; so I close this bug.
;; Following expression should eval as non-nil
(let ((pos 3))
    (insert "abcdef")
    (goto-char pos)
    (save-excursion (transpose-chars 2))
    (= pos (point))))
=> nil
Since the form inside save-excursion can modify the text before point,
there is never a guarantee that the numeric value of point stays the
same.  And if point points inside the modified text, it is generally
unspecified how point moves during the modification.

reply via email to

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