[Top][All Lists]

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

Re: save-excursion and the mark

From: Stefan Monnier
Subject: Re: save-excursion and the mark
Date: Sun, 19 Apr 2015 22:03:35 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> One thing that I really didn't like is that I had to replace
>     (region-active-p)
> with 
>     (and mark-active (not deactivate-mark))

I think this should be

     (and (region-active-p) (not deactivate-mark))

The (not deactivate-mark) test has always been needed if you intend your
tests to check what the user would see after running that code
interactively (in which case the command loop would deactivate the mark
at the end of the command if deactivate-mark is set).

The fact that you did not need (not deactivate-mark) in the past was
just a lucky accident for the code you happened to test.


reply via email to

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