[Top][All Lists]

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

Re: Emacs Lisp code formatting

From: Juri Linkov
Subject: Re: Emacs Lisp code formatting
Date: Sun, 07 Nov 2021 19:27:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

>> This is a nice feature, but I wonder why it's not used
>> by ‘C-u C-M-q’ (‘indent-pp-sexp’ with a prefix arg) in Lisp mode?
> It takes a sexp and formats it -- it doesn't support interactive code
> formatting, so no comments, and it'll turn ?\s into 32, etc.

Oh, I thought it works like 'pp-buffer' - just by adding/removing newlines
(because everything else is handled by 'indent-sexp').

Would it be possible to do such a thing and keep it uncomplicated?
For example, to ensure there is no newline after if/when/unless, but insert
a newline after its condition, unless it's short enough to fit on one line,

reply via email to

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