[Top][All Lists]

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

Re: Correct formatting of Guile in Emacs

From: Cameron
Subject: Re: Correct formatting of Guile in Emacs
Date: Mon, 01 Feb 2021 15:18:17 -0600
User-agent: Cyrus-JMAP/3.5.0-alpha0-93-gef6c4048e6-fm-20210128.002-gef6c4048

Hi Phil,

I haven't done this myself, but the manual has a page on this:

>From this, it seems like the 'emacs-guix' package has a 'guix-devel-mode' that 
>should indent per the Guix style guide.


On Mon, Feb 1, 2021, at 3:03 PM, Phil wrote:
> Hi,
> I'm in a position where I have quite a few packages built that I'd like
> to contribute to Guix.
> I'm writing these in emacs with scheme-mode/geiser installed.  However
> I've noted that any attempt to align my Guile code (eg M-x indent-region)
> results in code being aligned under the previous lines' parameter rather
> than simply indenting.
> So my code looks much wider, and uglier (IMHO) than that in the Guix repo:
> (something like
>   (this type
>     (of format)))
> ends up being reformated by Emacs to look like this:
> (something like
>            (this type
>                  (of format)))
> The more nesting and split lines the crazier this gets.  Some packages
> are unreadable using emacs' default scheme indentation without a large 
> monitor!
> It seems like an simple question (hopefully not too off-topic!) - but
> how do I make Emacs conform to code alignments rules adopted by Guile/Guix 
> repo?
> Is there an off-the-shelf setting, package or setup I can use?
> The Guile manual mentions "Emacs has good support for Scheme out of the
> box, with sensible indentation rules" - but these defaults seem at odds
> with the Guix repo (or I'm doing something daft!):
> Thanks,
> Phil.

reply via email to

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