GNU bug report logs -
#20357
25.0.50; deactivate-mark behavior broken
Previous Next
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
Hi Stefan,
On Fri, Apr 17, 2015 at 4:31 PM, Stefan Monnier
<monnier <at> iro.umontreal.ca> wrote:
>> (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,
>
> 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 is still not the correct behavior. Example code:
(with-temp-buffer
(insert "foobar")
(set-mark (point))
(goto-char (point-min))
(indent-region (point-min)
(point-max))
mark-active)
In 24.5 it returns nil, which is correct. While in 25 it returns t.
Oleh
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.