--- Begin Message ---
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.
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#20357: 25.0.50; deactivate-mark behavior broken |
Date: |
Fri, 17 Apr 2015 10:31:32 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> (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.
--- End Message ---