guix-patches
[Top][All Lists]
Advanced

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

[bug#28787] [PATCH 2/2] emacs-build-system: Change how patch-el-files su


From: Christopher Baines
Subject: [bug#28787] [PATCH 2/2] emacs-build-system: Change how patch-el-files substitutes commands.
Date: Wed, 11 Oct 2017 15:42:18 +0100

Previously the regex would match from /bin/ to a closing quote. However, this
is greedy, so will match up until the last ". This causes problems when there
are several quotes on the same line, for example:

org-effectiveness.el:
196:      (call-process "/bin/bash" nil t nil "-c" strplot)

Therefore, change . to \S so that it doesn't include whitespace
characters. Changing to a lazy quantifier would be an option, if that were
supported.

* guix/build/emacs-build-system.scm (patch-el-files): Change the regular
  expression used.
---
 guix/build/emacs-build-system.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/build/emacs-build-system.scm 
b/guix/build/emacs-build-system.scm
index 0260f15bb..c1d36766e 100644
--- a/guix/build/emacs-build-system.scm
+++ b/guix/build/emacs-build-system.scm
@@ -92,7 +92,7 @@ store in '.el' files."
          (el-dir (string-append out %install-suffix "/" elpa-name-ver))
          (substitute-cmd (lambda ()
                            (substitute* (find-files "." "\\.el$")
-                             (("\"/bin/([^.].*)\"" _ cmd)
+                             (("\"/bin/([^.]\\S*)\"" _ cmd)
                               (string-append
                                "\""
                                (or
-- 
2.14.2






reply via email to

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