bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#16752: 24.3.50; pp-to-string deactivates mark


From: Alex
Subject: bug#16752: 24.3.50; pp-to-string deactivates mark
Date: Sun, 18 Sep 2016 17:55:25 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

close 16728 25.1
quit

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> forcemerge 16728 16752
> thanks
>
>> Evaluating this expression returns:
>> (list deactivate-mark
>>       (pp-to-string '1)
>>       deactivate-mark)
>
> deactivate-mark is a global variable and lots of functions happen to
> work on internal buffers, which ends up "unwittingly" setting
> deactivate-mark to t.
>
> There are 2 directions to try and fix it:
> 1- let-bind deactivate-mark in functions like pp-to-string so as to
>    eliminate those spurious deactivations.  But there can be many of
>    them, and it doesn't solve the problem where the buffer-modification
>    is done in a non-temporary buffer.
> 2- make deactivate-mark buffer-local.  This is "The Right Way" but
>    might introduce new problems.
>    E.g. we really should deactivate the mark in all the buffers that
>    have their deactivate-mark set.
>
>
>         Stefan

Looks like option 2 was chosen, and the test cases in both bugs now work
as expected, so I believe this is done. Please re-open if I'm wrong.





reply via email to

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