[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#60467: 30.0.50; primitive-undo: Changes to be undone by function dif
From: |
Stefan Monnier |
Subject: |
bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced |
Date: |
Tue, 03 Jan 2023 21:49:01 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
>>>> I don't even understand what this is supposed to do.
>>> Yet you happily threw it away :-(
>>
>> Because there are no such precautions elsewhere in the code, and the
>> comment above ("In case garbage collection has removed OLD-BUL") does not
>> explain what its purpose is. A few lines below, old-bul is used without
>> such a precaution. Of course, if it has a purpose, it's okay to keep it.
>>
>
> I didn't remember the main reason why I removed that (cdr ptr). The reason
> is not only that the comment above it is wrong, but also that this (cdr ptr)
> condition itself is wrong: it makes that loop stop when the last element of
> the buffer-undo-list is reached. When buffer-undo-list is initially nil,
> (funcall body) adds a number of entries in buffer-undo-list, and there is no
> reason to exit that loop without processing its last element.
I think for your loop you'd need to check `ptr` instead of (cdr
ptr), indeed. For the loop currently in `subr.el` I think the (cdr ptr)
is OK because we use the `setcdr` to truncate the list, so that last
cons (whose `cdr` may be nil) will be in the list included in the
(apply ....) entry.
Stefan
- bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced, (continued)
- bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced, Ihor Radchenko, 2023/01/02
- bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced, Gregory Heytings, 2023/01/03
- bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced, Eli Zaretskii, 2023/01/03
- bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced, Gregory Heytings, 2023/01/03
- bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced, Eli Zaretskii, 2023/01/03
- bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced, Gregory Heytings, 2023/01/03
- bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced, Stefan Monnier, 2023/01/03
- bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced, Gregory Heytings, 2023/01/03
- bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced, Gregory Heytings, 2023/01/03
- bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced, Gregory Heytings, 2023/01/03
- bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced,
Stefan Monnier <=
- bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced, Gregory Heytings, 2023/01/04
- bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced, Gregory Heytings, 2023/01/04
- bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced, Eli Zaretskii, 2023/01/04
- bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced, Gregory Heytings, 2023/01/04
- bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced, Eli Zaretskii, 2023/01/04
- bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced, Gregory Heytings, 2023/01/04
- bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced, Stefan Monnier, 2023/01/04
- bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced, Gregory Heytings, 2023/01/04
- bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced, Eli Zaretskii, 2023/01/04
- bug#60467: 30.0.50; primitive-undo: Changes to be undone by function different from announced, Gregory Heytings, 2023/01/04