summary refs log tree commit diff
path: root/guix/build/emacs-build-system.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/build/emacs-build-system.scm')
-rw-r--r--guix/build/emacs-build-system.scm8
1 files changed, 6 insertions, 2 deletions
diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm
index 2404dbddb4..bd0d2e0266 100644
--- a/guix/build/emacs-build-system.scm
+++ b/guix/build/emacs-build-system.scm
@@ -92,8 +92,12 @@ store in '.el' files."
          (el-dir (string-append out %install-suffix "/" elpa-name-ver))
          (substitute-cmd (lambda ()
                            (substitute* (find-files "." "\\.el$")
-                             (("\"/bin/([^.].*)\"" _ cmd)
-                              (string-append "\"" (which cmd) "\""))))))
+                             (("\"/bin/([^.]\\S*)\"" _ cmd-name)
+                              (let ((cmd (which cmd-name)))
+                                (unless cmd
+                                  (error
+                                   "patch-el-files: unable to locate " cmd-name))
+                                (string-append "\"" cmd "\"")))))))
     (with-directory-excursion el-dir
       ;; Some old '.el' files (e.g., tex-buf.el in AUCTeX) are still encoded
       ;; with the "ISO-8859-1" locale.