[Top][All Lists]

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

Re: [PATCH] emacs: devel: Add indentation rules for 'modify-phases' keyw

From: Alex Kost
Subject: Re: [PATCH] emacs: devel: Add indentation rules for 'modify-phases' keywords.
Date: Tue, 20 Oct 2015 17:07:49 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Ludovic Courtès (2015-10-19 18:44 +0300) wrote:

> 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.”  :-)

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 <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!

Pushed, thanks!


reply via email to

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