bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#9622: [PATCH] Re: bug#9622: 23.3; flet indentation


From: akater
Subject: bug#9622: [PATCH] Re: bug#9622: 23.3; flet indentation
Date: Wed, 29 Sep 2021 18:12:10 +0000

Several fixes:

- 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.

Technical notes:

- 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.  If
  appropriate, I could add test(s) that would try to indent individual
  forms in the file; no change indicates test(s) passed.  Only I'm not
  sure what would be the best way to define an individual ert test per
  form but I guess I'll figure it out.  OK?

- parse-partial-sexp does not keep any record of relative position of
  subexpressions in superexpressions which I found surprising.  Things
  would be easier if it did.  Other things might become easier too.
  But I did not dare to patch it.

I also have stylistic notes.  First, the less important ones.

- 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.

- Lines
  > In Wishful Lisp, the following form would be
  > ...
  are supposed to convey the intent of what the form in quistion does,
  in a concise way.  Feel free to remove this if you feel it doesn't
  help.

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

Attachment: signature.asc
Description: PGP signature

Attachment: 0001-Fixup-cl-flet-indentation.patch
Description: Fix cl-flet indentation

Attachment: flet-tests.sexp
Description: Test cases


reply via email to

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