emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Indentation of def*


From: João Távora
Subject: Re: Indentation of def*
Date: Sun, 24 Oct 2021 16:19:54 +0100

On Sun, Oct 24, 2021 at 3:27 PM Stefan Kangas <stefankangas@gmail.com> wrote:
>
> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
> > The introduction of the `with-*' macros, added three decades ago without
> > any such heuristic, shows that these heuristics aren't necessary (or
> > useful).
>
> And, again, the correct fix for this is to explicitly say what you want
> with an indent declaration.  Unlike a heuristic, this will have no false
> positives - the user decides.

If there was NO code in the wild that didn't rely on this
heuristic, I could agree to that.  But it is an undeniable fact
that we do, and that code's indentation will be broken.

So, instead of killing the heuristic altogether, why shouldn't
we adjust it so that it has less false positives? In fact I think
if we tweak the heuristic to only apply to macro definitions
it will probably have zero false positives.  Unless I'm mistaken
there are NO macros whose name starts 'def' for which
we DON'T want to indent their uses like a `defun`.

Yes, that action will still bring some false negatives, i.e. the
indentation of SOME code in the wild will still be broken.
But "some" is better than "a lot of" in my book, so I'm completely
the rationale for NOT doing this less intrusive fix is completely
lost on me.

João



reply via email to

[Prev in Thread] Current Thread [Next in Thread]