[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#30147] Simplify “scripts/guix”
From: |
Mathieu Lirzin |
Subject: |
[bug#30147] Simplify “scripts/guix” |
Date: |
Wed, 24 Jan 2018 12:45:16 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hello again,
address@hidden (Ludovic Courtès) writes:
> Mathieu Lirzin <address@hidden> skribis:
>
>> From 77379bbf2642762927c01cc7f10eb5761626f172 Mon Sep 17 00:00:00 2001
>> From: Mathieu Lirzin <address@hidden>
>> Date: Tue, 23 Jan 2018 12:52:33 +0100
>> Subject: [PATCH] guix: Refactor script.
>> MIME-Version: 1.0
>> Content-Type: text/plain; charset=UTF-8
>> Content-Transfer-Encoding: 8bit
>>
>> * scripts/guix.in: Remove empty surrounding ‘let’. Define 'main' as the
>> procedure called when running the script.
>> (maybe-augment-load-paths!): Rename to ...
>> (augment-load-paths!): ... this. Use 'and=>' for 'file-exists?'.
>> (run-guix-main): Rename to ...
>> (main): ... this. Call 'augment-load-paths!'.
>
> Works for me. Applied and pushed, thanks!
Thanks for applying this.
I didn't notice that Emacs stopped setting ‘scheme-mode’ automatically
due to the extra line implied by the use of the Guile meta switch.
Here is a fix to please Emacs.
>From a798d6b7fa3b71faf85b4d415de99abccbfe7aab Mon Sep 17 00:00:00 2001
From: Mathieu Lirzin <address@hidden>
Date: Wed, 24 Jan 2018 12:29:17 +0100
Subject: [PATCH] =?UTF-8?q?guix:=20Let=20Emacs=20detect=20=E2=80=9Cscripts?=
=?UTF-8?q?/guix.in=E2=80=9D=20appropriate=20mode.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Since commit 6f774d481839f87178c5895ac2d661e141f879b8 which introduces the use
of Guile's meta switch in “scripts/guix.in”, Emacs was not using ‘scheme-mode’
for this file.
* scripts/guix.in: Replace "-*- scheme -*-" with a local variable.
---
scripts/guix.in | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/scripts/guix.in b/scripts/guix.in
index e0f0ae7e0..d1c12eae5 100644
--- a/scripts/guix.in
+++ b/scripts/guix.in
@@ -1,6 +1,5 @@
address@hidden@ \
--no-auto-compile -e main -s
--*- scheme -*-
!#
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Mark H Weaver <address@hidden>
@@ -57,3 +56,7 @@
;; but since the 'guix' command is not updated by 'guix pull', we cannot
;; really do it now.
(apply guix-main args)))
+
+;;; Local Variables:
+;;; mode: scheme
+;;; End:
--
2.16.0
Sorry for the mess.
--
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37