[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] emacs: devel: Add indentation rules for 'modify-phases' keyw
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH] emacs: devel: Add indentation rules for 'modify-phases' keywords. |
Date: |
Mon, 19 Oct 2015 17:44:49 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Alex Kost <address@hidden> 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.” :-)
> From 092dbb4460cf140c628eb4aeb4c5fff8f0083b3c Mon Sep 17 00:00:00 2001
> From: Alex Kost <address@hidden>
> 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!
Thanks,
Ludo’.