[Top][All Lists]

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

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

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

Hello, currently Emacs indents our 'modify-phases' macro like this:

(modify-phases %standard-phases
  (add-before 'build 'foo-phase
              (lambda _ 'foo)))
or this:

(modify-phases %standard-phases
   'build 'foo-phase
   (lambda _ 'foo)))
While IMHO it is better to have it indented like this:

(modify-phases %standard-phases
  (add-before 'build 'foo-phase
    (lambda _ 'foo)))
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:

(modify-phases %standard-phases
  (replace 'build
    (lambda _ (zero? 0))))

 (replace 'this

Attachment: 0001-emacs-devel-Add-indentation-rules-for-modify-phases-.patch
Description: Text Data

reply via email to

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