GNU bug report logs - #9622
23.3; flet indentation

Previous Next

Package: emacs;

Reported by: diogofsr <at> gmail.com (Diogo F. S. Ramos)

Date: Wed, 28 Sep 2011 01:59:02 UTC

Severity: minor

Tags: confirmed

Found in versions 23.3, 26.2

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: akater <nuclearspace <at> gmail.com>
Cc: Mattias Engdegård <mattiase <at> acm.org>, 9622 <at> debbugs.gnu.org, "Diogo F. S. Ramos" <diogofsr <at> gmail.com>
Subject: bug#9622: [PATCH] Re: bug#9622: 23.3; flet indentation
Date: Thu, 30 Sep 2021 08:37:36 +0200
akater <nuclearspace <at> gmail.com> writes:

> - We now check whether we're in the relevant subexpression of flet and
>   friends.
>
> - Added -p to the predicate's name.
>
> - Added cl-macrolet cl-flet* cl-symbol-macrolet to the list of local
>   definers.  I added cl-symbol-macrolet too because this is how SLIME
>   indents symbol-macrolet.

Thanks; applied to Emacs 28.

> - I attached flet-tests.sexp which only contains cl-flet forms written
>   the way they are meant to be indented.  I think writing them in
>   strings in deftest forms would be quite ugly and unreliable.

Indeed.  I have a new machinery for doing tests like this waiting for
Emacs 29 development to commence to fix this awkwardness.

> - You changed “iff” to “if”; I meant “iff”, i.e. “if and only if”; I
>   now changed it to “when” simply because the semantics corresponds
>   directly to that of lisp's own lingo and is thus in my opinion
>   easier to read.

Oops, sorry.

> The more involved stylistic note is
>
> - a line split issue that I wanted to discuss for some time.  See the
>   diff when it comes to second-order-parent and (pop parents).  TL;DR:
>   it's entirely up to you but I wanted to point out that this was done
>   deliberately.  Note that if pop (or a hypothetical cdrf) accepted
>   multiple arguments, most people would agree it's fine to keep these
>   two on a single line; if you have time, see the discussion I started
>   in emacs-devel:
>   https://lists.gnu.org/archive/html/emacs-devel/2021-09/msg02189.html

We never put two statements on the same line like that, so I added a
newline there (and some other stylistic fixes, like changing the `and' to
a when (the `and' is logical here (since we're doing a predicate), but
we prefer `when' when it's a long and involved body).

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




This bug report was last modified 92 days ago.

Previous Next


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