guix-commits
[Top][All Lists]
Advanced

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

01/03: etc: indent-code.el: Add indentation info for non-Guix Scheme con


From: Ludovic Courtès
Subject: 01/03: etc: indent-code.el: Add indentation info for non-Guix Scheme constructs.
Date: Fri, 20 Jan 2017 20:39:37 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit 830d4c1fcdff7be199e66cd70a5048264b54a151
Author: Ludovic Courtès <address@hidden>
Date:   Fri Jan 20 14:43:43 2017 +0100

    etc: indent-code.el: Add indentation info for non-Guix Scheme constructs.
    
    * etc/indent-code.el.in (guix-syntax--scheme-indent): New macro.
    Use it.
---
 etc/indent-code.el.in |   52 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/etc/indent-code.el.in b/etc/indent-code.el.in
index 7556b30..68ad72c 100755
--- a/etc/indent-code.el.in
+++ b/etc/indent-code.el.in
@@ -34,6 +34,58 @@
     (hack-dir-local-variables)
     (hack-local-variables-apply)))
 
+;; Add indentation info for Scheme constructs that are not Guix-specific.
+;; This is normally provided by Geiser but this file is for people who may not
+;; be running Geiser, so we just copy it here (from 'geiser-syntax.el').
+(defmacro guix-syntax--scheme-indent (&rest pairs)
+  `(progn ,@(mapcar (lambda (p)
+                      `(put ',(car p) 'scheme-indent-function ',(cadr p)))
+                    pairs)))
+
+(guix-syntax--scheme-indent
+ (and-let* 1)
+ (case-lambda 0)
+ (catch defun)
+ (class defun)
+ (dynamic-wind 0)
+ (guard 1)
+ (let*-values 1)
+ (let-values 1)
+ (let/ec 1)
+ (letrec* 1)
+ (match 1)
+ (match-lambda 0)
+ (match-lambda* 0)
+ (match-let scheme-let-indent)
+ (match-let* 1)
+ (match-letrec 1)
+ (opt-lambda 1)
+ (parameterize 1)
+ (parameterize* 1)
+ (receive 2)
+ (require-extension 0)
+ (syntax-case 2)
+ (test-approximate 1)
+ (test-assert 1)
+ (test-eq 1)
+ (test-equal 1)
+ (test-eqv 1)
+ (test-group-with-cleanup 1)
+ (test-runner-on-bad-count! 1)
+ (test-runner-on-bad-end-name! 1)
+ (test-runner-on-final! 1)
+ (test-runner-on-group-begin! 1)
+ (test-runner-on-group-end! 1)
+ (test-runner-on-test-begin! 1)
+ (test-runner-on-test-end! 1)
+ (test-with-runner 1)
+ (unless 1)
+ (when 1)
+ (while 1)
+ (with-exception-handler 1)
+ (with-syntax 1))
+
+
 (pcase command-line-args-left
   (`(,file-name ,package-name)
    ;; Indent the definition of PACKAGE-NAME in FILE-NAME.



reply via email to

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