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: Oleh Krehel <ohwoeowho <at> gmail.com>
Subject: bug#20357: closed (Re: bug#20357: 25.0.50; deactivate-mark
 behavior broken)
Date: Fri, 17 Apr 2015 14:32:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#20357: 25.0.50; deactivate-mark behavior broken

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 20357 <at> debbugs.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: 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.

[Message part 3 (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.



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.