bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#20357: 25.0.50; deactivate-mark behavior broken


From: Stefan Monnier
Subject: 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.





reply via email to

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