GNU bug report logs - #23108
25.0.92; emacs-lisp-mode: wrong indentation in `let' binding list

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Thu, 24 Mar 2016 16:41:02 UTC

Severity: minor

Tags: confirmed

Found in version 25.0.92

To reply to this bug, email your comments to 23108 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#23108; Package emacs. (Thu, 24 Mar 2016 16:41:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Heerdegen <michael_heerdegen <at> web.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 24 Mar 2016 16:41:02 GMT) Full text and rfc822 format available.

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

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.92; emacs-lisp-mode: wrong indentation in `let' binding list
Date: Thu, 24 Mar 2016 17:39:46 +0100
Hello,

in emacs -Q, this expression:

--8<---------------cut here---------------start------------->8---
(let (from to
           (temp-buffer (generate-new-buffer "temp")))
  body
  body)
--8<---------------cut here---------------end--------------->8---

is indented exactly as I pasted it here, e.g. in scratch or any
emacs-lisp-mode buffer.  IMHO the `temp-buffer' binding should be
indented to the same column as `from'.

When I wrap `from' in parens (which doesn't change the semantic of the
expression), the indentation suddenly works as I expect.


Thanks,

Michael.




In GNU Emacs 25.0.92.5 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2016-03-23 built on drachen
Repository revision: c0165ea4d6ecf81db6728782c7322c311ee0a783
Windowing system distributor 'The X.Org Foundation', version 11.0.11802000
System Description:	Debian GNU/Linux testing (stretch)

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS NOTIFY
LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LC_ALL: de_DE.utf8
  value of $LC_COLLATE: C
  value of $LC_TIME: C
  value of $LANG: de_DE.utf8
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23108; Package emacs. (Fri, 25 Mar 2016 16:06:01 GMT) Full text and rfc822 format available.

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

From: Kaushal Modi <kaushal.modi <at> gmail.com>
To: 23108 <at> debbugs.gnu.org
Subject: Re: 25.0.92; emacs-lisp-mode: wrong indentation in `let' binding list
Date: Fri, 25 Mar 2016 12:04:52 -0400
[Message part 1 (text/plain, inline)]
I would also like to have a solution to this.

For now, I arrange my let bindings as follows:

--8<---------------cut here---------------start------------->8---
(let ((temp-buffer (generate-new-buffer "temp"))
      from to)
  body
  body)
--8<---------------cut here---------------end--------------->8---

--
Kaushal Modi
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23108; Package emacs. (Fri, 25 Mar 2016 16:30:02 GMT) Full text and rfc822 format available.

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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Kaushal Modi <kaushal.modi <at> gmail.com>, 23108 <at> debbugs.gnu.org
Subject: Re: bug#23108: 25.0.92; emacs-lisp-mode: wrong indentation in `let'
 binding list
Date: Fri, 25 Mar 2016 18:29:42 +0200
On 03/25/2016 06:04 PM, Kaushal Modi wrote:
> I would also like to have a solution to this.
>
> For now, I arrange my let bindings as follows:

Me too, on both counts.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23108; Package emacs. (Sat, 26 Mar 2016 01:50:01 GMT) Full text and rfc822 format available.

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

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: 23108 <at> debbugs.gnu.org
Subject: Re: bug#23108: 25.0.92;
 emacs-lisp-mode: wrong indentation in `let' binding list
Date: Sat, 26 Mar 2016 02:49:47 +0100
Michael Heerdegen <michael_heerdegen <at> web.de> writes:

> (let (from to
>            (temp-buffer (generate-new-buffer "temp")))
>   body
>   body)

Hmm, `let' has just simply lisp-indent-function -> 1, so it seems the
list of bindings is not treated specially.  Thus, in the above case you
get an indentation like for a function call.


Michael.




Added tag(s) confirmed. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Sun, 16 Jul 2017 20:59:02 GMT) Full text and rfc822 format available.

Severity set to 'minor' from 'normal' Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Sun, 31 Oct 2021 03:13:02 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 234 days ago.

Previous Next


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