[PATCH] .dir-locals.el: Don't mess up indentation of prepend and append.

  • Done
  • quality assurance status badge
Details
3 participants
  • Liliana Marie Prikler
  • Ludovic Courtès
  • Tobias Geerinckx-Rice
Owner
unassigned
Submitted by
Liliana Marie Prikler
Severity
normal
L
L
Liliana Marie Prikler wrote on 24 Jan 2022 17:36
(address . guix-patches@gnu.org)
a2319eb73f7806721ccaba92f8648ac7375eec3b.camel@gmail.com
The current version appears to assume special values in the first and second
package, but it's either all lists (default append) or all package input
expressions (inside modify-inputs), which themselves are either packages
or a list consisting of a package and a string.

* .dir-locals.el: Drop (eval . (put 'prepend 'scheme-indent-function 2))
and (eval . (put 'append 'scheme-indent-function 2)).
---
.dir-locals.el | 2 --
1 file changed, 2 deletions(-)

Toggle diff (15 lines)
diff --git a/.dir-locals.el b/.dir-locals.el
index 12a6f08739..0edf2a8d23 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -60,8 +60,6 @@
;; 'modify-inputs' and its keywords.
(eval . (put 'modify-inputs 'scheme-indent-function 1))
(eval . (put 'replace 'scheme-indent-function 1))
- (eval . (put 'prepend 'scheme-indent-function 2))
- (eval . (put 'append 'scheme-indent-function 2))
;; 'modify-phases' and its keywords.
(eval . (put 'modify-phases 'scheme-indent-function 1))
--
2.34.0
L
L
Ludovic Courtès wrote on 26 Jan 2022 12:24
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)(address . 53505@debbugs.gnu.org)
87o83yivts.fsf@gnu.org
Hi!

Liliana Marie Prikler <liliana.prikler@gmail.com> skribis:

Toggle quote (8 lines)
> The current version appears to assume special values in the first and second
> package, but it's either all lists (default append) or all package input
> expressions (inside modify-inputs), which themselves are either packages
> or a list consisting of a package and a string.
>
> * .dir-locals.el: Drop (eval . (put 'prepend 'scheme-indent-function 2))
> and (eval . (put 'append 'scheme-indent-function 2)).

Yeah it’s been bothering me too. :-)

We can keep ‘prepend’ though as it doesn’t clash with anything.

Otherwise LGTM,
Ludo’.
L
L
Liliana Marie Prikler wrote on 26 Jan 2022 20:26
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 53505@debbugs.gnu.org)
48410bfa442f971803d45230594b60ff1b3e7af8.camel@gmail.com
Hi!

Am Mittwoch, dem 26.01.2022 um 12:24 +0100 schrieb Ludovic Courtès:
Toggle quote (17 lines)
> Hi!
>
> Liliana Marie Prikler <liliana.prikler@gmail.com> skribis:
>
> > The current version appears to assume special values in the first
> > and second package, but it's either all lists (default append) or
> > all package input expressions (inside modify-inputs), which
> > themselves are either packages or a list consisting of a package
> > and a string.
> >
> > * .dir-locals.el: Drop (eval . (put 'prepend 'scheme-indent-
> > function 2))
> > and (eval . (put 'append 'scheme-indent-function 2)).
>
> Yeah it’s been bothering me too.  :-)
>
> We can keep ‘prepend’ though as it doesn’t clash with anything.
It might not clash, but is its behaviour correct? IIRC, prepend and
append take a list of packages inside modify-inputs, so if I wanted to
add spam, ham, eggs, milk and butter to a python-package, I'd write
that as

(modify-inputs my-package
(prepend python-spam
python-ham
python-eggs
python-milk
python-butter))

That doesn't seem right, now does it?
T
T
Tobias Geerinckx-Rice wrote on 26 Jan 2022 21:39
Re: [PATCH] .dir-locals.el: Don't mess up indentation of prepend and append.
(address . 53505@debbugs.gnu.org)
87sftap6oe.fsf@nckx
Lily, Ludo',

In fact the indentation rule for ‘prepend’ convinced me that I was
holding it wrong the first time I tried it. Perhaps I was missing
a LIST call? I had to convince myself I really wasn't.

What's the case in which the indent-by-2 rule is correct? Trying
to learn here.

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYfGy8Q0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW155LwBAKc0XDoR903MMvIoTPHPNhdBxu5q7bnsgd+EpPau
jOocAQCcv5x5/c85zNWv7Rbcbmp4yregZ7hZqNPJYiOzQ/aHAw==
=tjSG
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 29 Jan 2022 00:03
Re: bug#53505: [PATCH] .dir-locals.el: Don't mess up indentation of prepend and append.
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)(address . 53505@debbugs.gnu.org)
87czkbbh09.fsf@gnu.org
Hallo!

Liliana Marie Prikler <liliana.prikler@gmail.com> skribis:

Toggle quote (32 lines)
> Am Mittwoch, dem 26.01.2022 um 12:24 +0100 schrieb Ludovic Courtès:
>> Hi!
>>
>> Liliana Marie Prikler <liliana.prikler@gmail.com> skribis:
>>
>> > The current version appears to assume special values in the first
>> > and second package, but it's either all lists (default append) or
>> > all package input expressions (inside modify-inputs), which
>> > themselves are either packages or a list consisting of a package
>> > and a string.
>> >
>> > * .dir-locals.el: Drop (eval . (put 'prepend 'scheme-indent-
>> > function 2))
>> > and (eval . (put 'append 'scheme-indent-function 2)).
>>
>> Yeah it’s been bothering me too.  :-)
>>
>> We can keep ‘prepend’ though as it doesn’t clash with anything.
> It might not clash, but is its behaviour correct? IIRC, prepend and
> append take a list of packages inside modify-inputs, so if I wanted to
> add spam, ham, eggs, milk and butter to a python-package, I'd write
> that as
>
> (modify-inputs my-package
> (prepend python-spam
> python-ham
> python-eggs
> python-milk
> python-butter))
>
> That doesn't seem right, now does it?

That looks wrong indeed. Actually these two rules make no sense, right?
I don’t know what I was thinking about.

So I guess you can drop them, sorry for the noise!

Ludo’.
L
L
Liliana Marie Prikler wrote on 29 Jan 2022 08:51
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 53505-done@debbugs.gnu.org)
de52f5437b6f83283a6e710ac77c82be7a67e413.camel@gmail.com
Hi

Am Samstag, dem 29.01.2022 um 00:03 +0100 schrieb Ludovic Courtès:
Toggle quote (9 lines)
> Hallo!
>
> Liliana Marie Prikler <liliana.prikler@gmail.com> skribis:
> > It might not clash, but is its behaviour correct?  [...]
>
> That looks wrong indeed.  Actually these two rules make no sense,
> right? I don’t know what I was thinking about.
>
> So I guess you can drop them, sorry for the noise!
Don't worry and thanks for confirming. I've pushed this now.

Cheers
Closed
?