GNU bug report logs - #33301
27.0.50; broken elisp indentation for non-definition symbols starting with "def.."

Previous Next

Package: emacs;

Reported by: João Távora <joaotavora <at> gmail.com>

Date: Wed, 7 Nov 2018 13:22:02 UTC

Severity: minor

Tags: confirmed, moreinfo

Merged with 43329

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 #66 received at 33301 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 33301 <at> debbugs.gnu.org,
 Noam Postavsky <npostavs <at> gmail.com>
Subject: Re: bug#33301: 27.0.50; broken elisp indentation for non-definition
 symbols starting with "def.."
Date: Sat, 22 Aug 2020 17:19:25 +0100
[Message part 1 (text/plain, inline)]
Hi Lars, thanks for your review of old bugs.

I wouldn't count 34 as "oodles" and don't think a new line for each
occurrence of what is essentially a breach of convention is a high price to
pay. Even converting some of those to macros or "make-foo" could be worth
it if it would enable non-surprising indentation.

As for the problem of needing to load macros before indenting forms where
they appears, that's already very much a thing. We wouldn't be creating new
problems there, it's just the way it is.

As for out-of-tree definitions, we could be lenient and have this saner
indentation be controlled by a variable which we would default to 'insane,
but to  'sane inside Emacs's source, via directory local variables.

So I don't think we should throw in the towel on this one.

João

On Sat, Aug 22, 2020, 15:58 Lars Ingebrigtsen <larsi <at> gnus.org> wrote:

> João Távora <joaotavora <at> gmail.com> writes:
>
> > -                     (string-match "\\`def" function)))
> > +                     (string-match "\\`def" function)
> > +                        (or (not (derived-mode-p 'emacs-lisp-mode))
> > +                            (macrop (intern function)))))
>
> As others noted, this means that indentation changes when you've
> loaded/not loaded the file that defines the macro, which may be
> awkward.  But also, as your grep showed, there's oodles of functions in
> Emacs the define stuff, and you'd have to add indentation specs to all
> of them.  And that doesn't take out-of-tree definitions into account.
>
> So I don't really see how this can be fixed in any sensible way --
> changing this heuristic will just annoy more than it fixes things, I
> think.
>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no
>
[Message part 2 (text/html, inline)]

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

Previous Next


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