[Top][All Lists]

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

03/03: build: emacs: Fix `store-file->elisp-source-file'.

From: Arun Isaac
Subject: 03/03: build: emacs: Fix `store-file->elisp-source-file'.
Date: Mon, 22 May 2017 19:07:21 -0400 (EDT)

arunisaac pushed a commit to branch master
in repository guix.

commit d0a26f3a68c77d6071967a9711c53988570b91e5
Author: Arun Isaac <address@hidden>
Date:   Wed May 17 21:39:27 2017 +0530

    build: emacs: Fix `store-file->elisp-source-file'.
    This prevents a ".el.el" extension for source files with no version number 
    their file name.
    * guix/build/emacs-build-system.scm (store-file->elisp-source-file): Remove
      ".el" extension from file name before splitting to name and version.
 guix/build/emacs-build-system.scm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/guix/build/emacs-build-system.scm 
index 44e8b0d..3538e9f 100644
--- a/guix/build/emacs-build-system.scm
+++ b/guix/build/emacs-build-system.scm
@@ -47,10 +47,12 @@
 (define (store-file->elisp-source-file file)
   "Convert FILE, a store file name for an Emacs Lisp source file, into a file
 name that has been stripped of the hash and version number."
-  (let-values (((name version)
-                (package-name->name+version
-                 (strip-store-file-name file))))
-    (string-append name ".el")))
+  (let ((suffix ".el"))
+    (let-values (((name version)
+                  (package-name->name+version
+                   (basename
+                    (strip-store-file-name file) suffix))))
+      (string-append name suffix))))
 (define* (unpack #:key source #:allow-other-keys)
   "Unpack SOURCE into the build directory.  SOURCE may be a compressed

reply via email to

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