[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Indentation of def*
From: |
Lars Ingebrigtsen |
Subject: |
Re: Indentation of def* |
Date: |
Wed, 20 Oct 2021 09:52:10 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Richard Stallman <rms@gnu.org> writes:
> Please keep the heuristic. It is still useful.
>
> If file A uses a deffoober construct defined in file B, and you visit
> file A with file B not loaded, the heuristic will make the uses of
> deffoober indent properly.
Or wrongly -- functions like `default-boundp' are indented wrongly using
that heuristic.
> The idea of this was that if you define something whose name starts
> with `def', it should be a defining construct. If people don't follow
> that convention, that's a mistake.
They don't follow that convention.
> Giving those macros explicit indentation properties is ok. With that
> done, the heuristic is no longer needed when their definitions are loaded.
>
> But I think we should still use the heuristic for any def... construct
> whose definition is not currenly loaded.
I don't see what makes these macros special. You have the same problem
with macros like `with-*' and `when-let' -- these also indent wrongly if
you haven't loaded their definitions.
The moral is: If you edit Emacs Lisp, you should load the file you're
editing first, otherwise it'll indent badly. We've plastered over this
"problem" for the def* macros only, but there's so many other macros
that also need special indentation that handling def* macros specially
is a disservice to everybody.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Re: Indentation of def*, Lars Ingebrigtsen, 2021/10/18
- Re: Indentation of def*, Richard Stallman, 2021/10/20
- Re: Indentation of def*,
Lars Ingebrigtsen <=
- Re: Indentation of def*, João Távora, 2021/10/20
- Re: Indentation of def*, Lars Ingebrigtsen, 2021/10/20
- Re: Indentation of def*, João Távora, 2021/10/20
- Re: Indentation of def*, Lars Ingebrigtsen, 2021/10/20
- Re: Indentation of def*, João Távora, 2021/10/20
- Re: Indentation of def*, Richard Stallman, 2021/10/23
- Re: Indentation of def*, Lars Ingebrigtsen, 2021/10/24
- Re: Indentation of def*, Stefan Kangas, 2021/10/24
- Re: Indentation of def*, João Távora, 2021/10/24
- Re: Indentation of def*, Stefan Monnier, 2021/10/24