From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: [PATCH] emacs: devel: Add indentation rules for 'modify-phases' keywords. Date: Tue, 20 Oct 2015 17:07:49 +0300 Message-ID: <874mhliqfe.fsf@gmail.com> References: <87d1wdsb3i.fsf@gmail.com> <87k2qiyia6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36847) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoXZx-0002i2-4y for guix-devel@gnu.org; Tue, 20 Oct 2015 10:08:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZoXZr-0004Je-IN for guix-devel@gnu.org; Tue, 20 Oct 2015 10:07:53 -0400 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") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org Ludovic Court=C3=A8s (2015-10-19 18:44 +0300) wrote: > Alex Kost 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 =E2=80=9Chygienic indentation.= =E2=80=9D :-) 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 >> 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' keyword= s. >> (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! --=20 Alex