|
From: | Andreas Röhler |
Subject: | bug#13949: 24.3.50; `fill-paragraph' should not always put the buffer as modified |
Date: | Thu, 14 Mar 2013 11:27:25 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 |
Am 14.03.2013 08:57, schrieb Dani Moncayo:
This seems a bug, since step #4 didn't make any change in the buffer contents (the paragraph was already filled).Step #4 does change the buffer, because M-q doesn't know whether the paragraph is already filled, so it fills it anew each time. Emacs always behaved like that.Ah, Ok. Well, since the `fill-paragraph' command at step #4 leaved the buffer with the same contents, flagging the buffer as modified was unnecessary in this case. In general, I think that a command should flag the buffer as modified only when the buffer contents at the end of the command were different from the contents at the beginning of that same command. But, I don't know complex is that to implement, and perhaps that complexity outweighs the benefits.
Hi, don't think it's complex. AFAIU the changed-flag presently is set by some commands assumed to change the buffer without regard to the result - as shown. Should not be that complicated to copy the buffers contents into a temporary buffer in this case and check both buffers afterwards if being equal. IMHO it's worth to do that change wrt fill-commands. Best, Andreas
I'll let you (maintainers) to judge this. Feel free to close this bug if the change isn't worth the trouble. Thanks.
[Prev in Thread] | Current Thread | [Next in Thread] |