From: Alex Kost <alezost@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] emacs: devel: Add indentation rules for 'modify-phases' keywords.
Date: Tue, 20 Oct 2015 17:07:49 +0300 [thread overview]
Message-ID: <874mhliqfe.fsf@gmail.com> (raw)
In-Reply-To: <87k2qiyia6.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Mon, 19 Oct 2015 17:44:49 +0200")
Ludovic Courtès (2015-10-19 18:44 +0300) wrote:
> Alex Kost <alezost@gmail.com> skribis:
>
>> This patch will do it. Of course we can just use:
>>
>> (put 'replace 'scheme-indent-function 1)
>> (put 'add-after 'scheme-indent-function 2)
>> (put 'add-before 'scheme-indent-function 2)
>>
>> But potentially these keywords may also be used outside 'modify-phases'.
>>
>> So with the attached more complex rules, 'replace', 'add-before' and
>> 'add-after' keywords will be indented specially only when they are
>> inside 'modify-phases', otherwise they will be indented as usual:
>
> This is perfect. You have just invented “hygienic indentation.” :-)
Ha-ha! Ideally the best would be to make a single indentation rule for
'modify-phases' macro, but I don't know if it's even possible: the
internals of emacs indentation machinery look like a black magic for me.
>> From 092dbb4460cf140c628eb4aeb4c5fff8f0083b3c Mon Sep 17 00:00:00 2001
>> From: Alex Kost <alezost@gmail.com>
>> Date: Sat, 17 Oct 2015 19:02:39 +0300
>> Subject: [PATCH] emacs: devel: Add indentation rules for 'modify-phases'
>> keywords.
>>
>> * emacs/guix-devel.el: Add indentation rules for 'modify-phases' keywords.
>> (guix-devel-indent-modify-phases-keyword,
>> guix-devel-indent-modify-phases-keyword-1,
>> guix-devel-indent-modify-phases-keyword-2): New functions.
>
> OK!
Pushed, thanks!
--
Alex
prev parent reply other threads:[~2015-10-20 14:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-17 16:39 [PATCH] emacs: devel: Add indentation rules for 'modify-phases' keywords Alex Kost
2015-10-19 15:44 ` Ludovic Courtès
2015-10-20 14:07 ` Alex Kost [this message]
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=874mhliqfe.fsf@gmail.com \
--to=alezost@gmail.com \
--cc=guix-devel@gnu.org \
--cc=ludo@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.