GNU bug report logs - #16852
24.3.50; Elisp indentation bug in `indent-for-tab-command'

Previous Next

Package: emacs;

Reported by: Oleh <o.krehel <at> tue.nl>

Date: Sun, 23 Feb 2014 14:22:01 UTC

Severity: minor

Found in version 24.3.50

To reply to this bug, email your comments to 16852 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#16852; Package emacs. (Sun, 23 Feb 2014 14:22:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Oleh <o.krehel <at> tue.nl>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 23 Feb 2014 14:22:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Oleh <o.krehel <at> tue.nl>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; Elisp indentation bug in `indent-for-tab-command'
Date: Sun, 23 Feb 2014 15:20:56 +0100
Hi,

With emacs -Q, and this text in *scratch*:

(
 progn
 )

and the point anywhere on the last line, pressing "C-i" will produce this
indentation:

(
 progn
  )

So one extra space is being inserted before the closing paren.

regards,
Oleh





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16852; Package emacs. (Sun, 23 Feb 2014 15:04:02 GMT) Full text and rfc822 format available.

Message #8 received at 16852 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Oleh <o.krehel <at> tue.nl>
Cc: 16852 <at> debbugs.gnu.org
Subject: Re: bug#16852: 24.3.50;
 Elisp indentation bug in `indent-for-tab-command'
Date: Sun, 23 Feb 2014 17:02:57 +0200
Oleh <o.krehel <at> tue.nl> writes:

> With emacs -Q, and this text in *scratch*:
>
> (
>  progn
>  )
>
> and the point anywhere on the last line, pressing "C-i" will produce this
> indentation:
>
> (
>  progn
>   )
>
> So one extra space is being inserted before the closing paren.

Looks intentional to me. `progn' usually has some arguments. Add at
least one and see that the closing paren lines up to it just fine.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16852; Package emacs. (Sun, 23 Feb 2014 16:11:02 GMT) Full text and rfc822 format available.

Message #11 received at 16852 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Oleh Krehel <o.krehel <at> tue.nl>
Cc: 16852 <at> debbugs.gnu.org
Subject: Re: bug#16852: 24.3.50;
 Elisp indentation bug in `indent-for-tab-command'
Date: Sun, 23 Feb 2014 18:10:06 +0200
On 23.02.2014 17:37, Oleh Krehel wrote:
> It's not consistent with `indent-sexp'. Call it from beginning of sexp and see
> that it reverts to the first state, which is the correct one in my opinion.

Hmm. Looks like a bug in `indent-sexp' to me.

(Please keep the bug address in Cc).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16852; Package emacs. (Mon, 24 Feb 2014 20:53:01 GMT) Full text and rfc822 format available.

Message #14 received at 16852 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: Oleh Krehel <o.krehel <at> tue.nl>, 16852 <at> debbugs.gnu.org
Subject: Re: bug#16852: 24.3.50;
 Elisp indentation bug in `indent-for-tab-command'
Date: Mon, 24 Feb 2014 15:52:34 -0500
> Hmm. Looks like a bug in `indent-sexp' to me.

Indeed, there are some discrepancies in Elisp between indent-region and
indent-line.  We should fix them by scrapping the indent-region code,
I think (tho this requires improving the generic indent-region code so
that it can also do the "indent-comment" thingy that Elisp's
indent-region does).


        Stefan




This bug report was last modified 11 years and 110 days ago.

Previous Next


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