From: Eli Zaretskii <eliz@gnu.org>
To: Keith David Bershatsky <esq@lawlist.com>
Cc: 25992@debbugs.gnu.org
Subject: bug#25992: perform-replace leaves mark-active when not transient-mark-mode
Date: Mon, 06 Mar 2017 18:26:53 +0200 [thread overview]
Message-ID: <83innmid6a.fsf@gnu.org> (raw)
In-Reply-To: <m2k283yxg0.wl%esq@lawlist.com> (message from Keith David Bershatsky on Sun, 05 Mar 2017 18:02:23 -0800)
> Date: Sun, 05 Mar 2017 18:02:23 -0800
> From: Keith David Bershatsky <esq@lawlist.com>
>
> When transient-mark-mode is turned off, perform-replace leaves mark-active set to `t`.
>
> Step 1: Launch emacs -q
>
> Step 2: Turn off transient-mark-mode. (transient-mark-mode -1)
>
> Step 3: Evaluate mark-active and verify it is `nil`.
>
> Step 4: Run a simple perform-replace such as: (replace-regexp ";" "@" nil 1 2)
>
> Step 5: Evaluate mark-active and see that it is now set `t`.
>
> The desired behavior is to leave `mark-active` set to `nil` if it was previously set to `nil`.
I'm not sure why you worry about mark-active when transient-mark-mode
is off: AFAIK that flag is only meaningful when transient-mark-mode is
on. Can you describe your use case?
Anyway, the reason for activating the mark is that replace-regexp
calls push-mark, which always activates the mark when
transient-mark-mode is turned off. Not sure why we do that, but the
code which does that has been doing it for the last 24 years, so I
don't think we should change that now, unless we have a _very_ good
reason.
Thanks.
next prev parent reply other threads:[~2017-03-06 16:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-06 2:02 bug#25992: perform-replace leaves mark-active when not transient-mark-mode Keith David Bershatsky
2017-03-06 16:26 ` Eli Zaretskii [this message]
2017-03-06 17:06 ` Keith David Bershatsky
2017-03-06 18:45 ` Eli Zaretskii
2017-03-07 5:55 ` Keith David Bershatsky
2017-03-07 15:37 ` Eli Zaretskii
2017-03-07 17:32 ` Keith David Bershatsky
2017-03-07 19:25 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83innmid6a.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=25992@debbugs.gnu.org \
--cc=esq@lawlist.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.