GNU bug report logs - #20357
25.0.50; deactivate-mark behavior broken

Previous Next

Package: emacs;

Reported by: Oleh Krehel <ohwoeowho <at> gmail.com>

Date: Fri, 17 Apr 2015 10:27:01 UTC

Severity: normal

Found in version 25.0.50

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#20357: closed (25.0.50; deactivate-mark behavior broken)
Date: Fri, 17 Apr 2015 14:32:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 17 Apr 2015 10:31:32 -0400
with message-id <jwv383yygqg.fsf-monnier+emacsbugs <at> gnu.org>
and subject line Re: bug#20357: 25.0.50; deactivate-mark behavior broken
has caused the debbugs.gnu.org bug report #20357,
regarding 25.0.50; deactivate-mark behavior broken
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
20357: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20357
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Oleh Krehel <ohwoeowho <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.50; deactivate-mark behavior broken
Date: Fri, 17 Apr 2015 12:21:01 +0200
This is a recent change, 24.5.2 doesn't have this bug.

How to reproduce:

1. Mark some text.
2. Call this:

(let (deactivate-mark)
  (indent-region (region-beginning)
                 (region-end)))

Expected behavior: the mark isn't deactivated.

Actual behavior: the mark is deactivated.


[Message part 3 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Oleh Krehel <ohwoeowho <at> gmail.com>
Cc: 20357-done <at> debbugs.gnu.org
Subject: Re: bug#20357: 25.0.50; deactivate-mark behavior broken
Date: Fri, 17 Apr 2015 10:31:32 -0400
> (let (deactivate-mark)
>   (indent-region (region-beginning)
>                  (region-end)))
> Expected behavior: the mark isn't deactivated.
> Actual behavior: the mark is deactivated.

Oops, indeed.  Fixed with the patch below,


        Stefan


diff --git a/lisp/indent.el b/lisp/indent.el
index 74e73a6..18c1fd4 100644
--- a/lisp/indent.el
+++ b/lisp/indent.el
@@ -537,7 +537,7 @@ column to indent to; if it is nil, use one of the three methods above."
   ;; In most cases, reindenting modifies the buffer, but it may also
   ;; leave it unmodified, in which case we have to deactivate the mark
   ;; by hand.
-  (deactivate-mark))
+  (setq deactivate-mark t))
 
 (defun indent-relative-maybe ()
   "Indent a new line like previous nonblank line.


This bug report was last modified 10 years and 116 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.