GNU bug report logs - #43329
28.0.50; Incorrect indentation for variables starting with `def' in let form

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Fri, 11 Sep 2020 10:11:02 UTC

Severity: minor

Tags: confirmed, moreinfo

Merged with 33301

Found in versions 24.3, 27.0.50, 28.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 43329 <at> debbugs.gnu.org
Subject: Re: bug#43329: 28.0.50; Incorrect indentation for variables
 starting with `def' in let form
Date: Fri, 11 Sep 2020 12:26:27 +0200
Philipp Stephani <p.stephani2 <at> gmail.com> writes:

> In the scratch buffer, enter
>
> (let ((defa
>        foo)))
>
> and reindent the second line.  Emacs will insert an additional space
> before `foo' so that the `f' is now below the `e'.  This seems to happen
> only for variables starting with `def' (but not `def' itself).

Yes, the Emacs Lisp indentation machinery assumes that everything that
starts with "def" is a macro that defines something.  That's pretty
quirky, but it's been that way since forever, so it's probably too late
to do something about that now.

It should, however, be possible to do something about this in a `let'
form, you'd think.  But I've tried to find the place where this happens
(I was looking at it just the other day!), but my grep skills fail me.

Anybody remember which function this happens in?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




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

Previous Next


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