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

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

bug#20357: 25.0.50; deactivate-mark behavior broken


From: Stefan Monnier
Subject: bug#20357: 25.0.50; deactivate-mark behavior broken
Date: Fri, 17 Apr 2015 15:15:58 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>>> (with-temp-buffer
>>> (insert "foobar")
>>> (set-mark (point))
>>> (goto-char (point-min))
>>> (indent-region (point-min)
>>> (point-max))
>>> mark-active)
>>> In 24.5 it returns nil, which is correct. While in 25 it returns t.
>> Why is it more correct to return nil than to return t?
> Because it's a long standing behavior that if you mark some stuff and
> press TAB, the mark will be deactivated.

That's still the case.  The difference is that now it's deactivated by
the command loop rather than by the command itself.  Doing it in the
command loop is the normal behavior (the one used for most other
commands which cause the mark to be deactivated).

>>> This is a recent change, 24.5.2 doesn't have this bug.
>>> (let (deactivate-mark)
>>>   (indent-region (region-beginning)
>>>                  (region-end)))
>>> Expected behavior: the mark isn't deactivated.
>> At least in 24.4, the mark does get deactivated in my test.

It's also deactivated in Emacs-23.4 in my tests.

> But when I've tested with 24.5 or 25 on my own machine, the tests were
> running fine.

I think we need to know more about what your tests really do.
Maybe they should just be fixed to test (or (not mark-active)
deactivate-mark) instead of only testing mark-active.


        Stefan





reply via email to

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