From: taylanbayirli@gmail.com (Taylan Ulrich Bayırlı/Kammer)
To: Andreas Enge <andreas@enge.fr>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH 4/4] gnu: Add python-requests-mock.
Date: Tue, 15 Sep 2015 19:32:21 +0200 [thread overview]
Message-ID: <87y4g7y4ey.fsf@T420.taylan> (raw)
In-Reply-To: <20150915171744.GA3054@debian> (Andreas Enge's message of "Tue, 15 Sep 2015 19:17:44 +0200")
Andreas Enge <andreas@enge.fr> writes:
> Hello,
>
> On Tue, Sep 15, 2015 at 06:54:51PM +0200, Mathieu Lirzin wrote:
>> (sha256
>> (base32
>> "..."))
>
> like someone else previously on this list I was also puzzled by the discussion
> on formatting style (meaning, I did not understand what the indentation to
> apply or to avoid is), so I wonder if there are actual rules to be formulated
> and applied in case of manual formatting. My impression so far was that
> indentation is usually by 2 spaces. So does this mean we now indent only by 1,
> or does it depend on the context?
Emacs will use 2 spaces when the symbol (e.g. sha256 in this case) has
its 'scheme-indent-function' property set, and 1 space otherwise. So
you get
(let (...)
foobar) ;two spaces because 'let has its 'scheme-indent-function
;set to 1 (meaning *one* argument is "special", here the
;list of bindings)
and
(display
(string-append
foobar
quux)) ;one space each because they're plain functions and have
;no 'scheme-indent-function property set
Under Guix's sources, the .dir-locals.el file contains expressions of
the form (put 'foo 'quux value), which insert properties into symbols.
(Here the 'foo symbol gets its 'quux property set.) Symbols appearing
there, like for instance 'with-store or 'modify-phases or 'substitute*
should probably have their arguments 2-space indented, and others
1-space, since that's what Emacs will do automatically.
By the way, shall you put a newline directly before the "special"
argument of such a form, e.g. the bindings-list of a let expression,
then you use 4 spaces for the "special" argument:
(let
(...)
foobar)
(modify-phases
%standard-phases
(replace 'foo bar)
...)
And also, as you might have noticed, it's mostly macros that get their
'scheme-indent-function set. I don't know if this rule is enforced
under Guix.
Taylan
next prev parent reply other threads:[~2015-09-15 17:32 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-14 21:23 [PATCH 0/4] Add more dependencies of OpenStack Cyril Roelandt
2015-09-14 21:23 ` [PATCH 1/4] gnu: Add python-oslo.serialization Cyril Roelandt
2015-09-15 16:34 ` Mathieu Lirzin
2015-09-14 21:23 ` [PATCH 2/4] gnu: Add python-oslo.context Cyril Roelandt
2015-09-15 16:36 ` Mathieu Lirzin
2015-09-14 21:23 ` [PATCH 3/4] gnu: Add python-webob Cyril Roelandt
2015-09-15 16:43 ` Mathieu Lirzin
2015-09-15 22:58 ` Cyril Roelandt
2015-09-16 9:03 ` Andreas Enge
2015-09-14 21:23 ` [PATCH 4/4] gnu: Add python-requests-mock Cyril Roelandt
2015-09-15 16:54 ` Mathieu Lirzin
2015-09-15 17:17 ` Andreas Enge
2015-09-15 17:32 ` Taylan Ulrich Bayırlı/Kammer [this message]
2015-09-15 18:36 ` Taylan Ulrich Bayırlı/Kammer
2015-09-16 20:10 ` Andreas Enge
2015-09-16 20:54 ` [PATCH 0/4] Add more dependencies of OpenStack Cyril Roelandt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y4g7y4ey.fsf@T420.taylan \
--to=taylanbayirli@gmail.com \
--cc=andreas@enge.fr \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.