From 667b2508464374a01db3588504b981ec9266a2ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 18 Aug 2014 14:53:10 +0200 Subject: gexp: Add 'ungexp-native' and 'ungexp-native-splicing'. * guix/gexp.scm ()[natives]: New field. (write-gexp): Use both 'gexp-references' and 'gexp-native-references'. (gexp->derivation): Use both 'gexp-inputs' and 'gexp-native-inputs', and append them. (gexp-inputs): Add 'references' parameter and honor it. (gexp-native-inputs): New procedure. (gexp->sexp)[reference->sexp]: Add 'native?' parameter and honor it. Use it, and use 'gexp-native-references'. (gexp)[collect-native-escapes]: New procedure. [escape->ref]: Handle 'ungexp-native' and 'ungexp-native-splicing'. [substitute-ungexp, substitute-ungexp-splicing]: New procedures. [substitute-references]: Use them, and handle 'ungexp-native' and 'ungexp-native-splicing'. Adjust generated 'make-gexp' call to provide both normal references and native references. [read-ungexp]: Support 'ungexp-native' and 'ungexp-native-splicing'. Add reader extension for #+. * tests/gexp.scm (gexp-native-inputs): New procedure. (gexp->sexp*): Add 'target' parameter. ("ungexp + ungexp-native", "input list + ungexp-native", "input list splicing + ungexp-native-splicing", "gexp->derivation, ungexp-native", "gexp->derivation, ungexp + ungexp-native"): New tests. ("sugar"): Add tests for #+ and #+@. * doc/guix.texi (G-Expressions): Document 'ungexp-native' et al. --- .dir-locals.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to '.dir-locals.el') diff --git a/.dir-locals.el b/.dir-locals.el index 69c25cbe8f..ce7033757d 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -40,11 +40,12 @@ (eval . (put 'mlet 'scheme-indent-function 2)) (eval . (put 'run-with-store 'scheme-indent-function 1)) - ;; Recognize '~' and '$', as used for gexps, as quotation symbols. This - ;; notably allows '(' in Paredit to not insert a space when the preceding - ;; symbol is one of these. + ;; Recognize '~', '+', and '$', as used for gexps, as quotation symbols. + ;; This notably allows '(' in Paredit to not insert a space when the + ;; preceding symbol is one of these. (eval . (modify-syntax-entry ?~ "'")) - (eval . (modify-syntax-entry ?$ "'")))) + (eval . (modify-syntax-entry ?$ "'")) + (eval . (modify-syntax-entry ?+ "'")))) (emacs-lisp-mode . ((indent-tabs-mode . nil))) (texinfo-mode . ((indent-tabs-mode . nil) (fill-column . 72)))) -- cgit v1.2.3