GNU bug report logs - #35021
M-^ (delete-indentation) doesn't work without a mark present

Previous Next

Package: emacs;

Reported by: Jon Irving <j <at> lollyshouse.ca>

Date: Wed, 27 Mar 2019 14:20:02 UTC

Severity: normal

Merged with 35036

Found in version 27.0.50

Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Jon Irving <j <at> lollyshouse.ca>
Cc: Stephen Leake <stephen_leake <at> stephe-leake.org>, 35021 <at> debbugs.gnu.org, Ɓukasz Stelmach <stlman <at> poczta.fm>
Subject: bug#35021: M-^ (delete-indentation) doesn't work without a mark present
Date: Wed, 27 Mar 2019 16:09:14 +0000
[0001-Fix-delete-indentation-when-region-is-inactive.patch (text/x-diff, attachment)]
[Message part 2 (text/plain, inline)]
Jon Irving <j <at> lollyshouse.ca> writes:

> I believe this is related to the following commits:
>
> b515edb985 Fix bug in delete-indentation when region is inactive
> 09c220a5cf Minor fixes for the last change
> 8fa94a1ecc If the region is active, join all the lines it spans
>
> From a clean `emacs -Q` start:
>
> 1. Move point up to the bottom line of the *scratch* buffer comments
> 2. Type M-^ (or M-x delete-indentation)
> 3. Observe the following message in the minibuffer:
>      The mark is not set now, so there is no region

This is because delete-indentation is currently using the 'r'
interactive code, which barfs if the region is inactive.

I attach a patch which fixes this and also updates the entry for
delete-indentation in the Elisp manual.  Is it acceptable?

Stephen, what is the difference between the two tests
simple-delete-indentation-no-region and
simple-delete-indentation-inactive-region?  Can they be merged?

Thanks,

-- 
Basil

This bug report was last modified 6 years and 48 days ago.

Previous Next


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