[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/05: build: emacs-utils: Fix `emacs-substitute-variables'.
From: |
guix-commits |
Subject: |
01/05: build: emacs-utils: Fix `emacs-substitute-variables'. |
Date: |
Thu, 13 Oct 2022 16:20:53 -0400 (EDT) |
ngz pushed a commit to branch master
in repository guix.
commit 00fa3777104cfaebeed25874390a870ba9bc8899
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Thu Oct 13 21:40:56 2022 +0200
build: emacs-utils: Fix `emacs-substitute-variables'.
* guix/build/emacs-utils.scm (emacs-substitute-variables): Fix the regexp
matching variable name.
With end-of-word regexp ("\>"), the previous regexp may match the prefix of
a variable only, effectively deleting the rest of its name.
For example,
(emacs-substitute-variables "file.el"
("foo" ...))
could match (defvar foo-bar ...) and replace it with (defvar foo ...).
---
guix/build/emacs-utils.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/guix/build/emacs-utils.scm b/guix/build/emacs-utils.scm
index b2280ae70c..ede400ffb2 100644
--- a/guix/build/emacs-utils.scm
+++ b/guix/build/emacs-utils.scm
@@ -220,7 +220,7 @@ useful to avoid double quotes being added when the
replacement is provided as
a string."
((_ file (variable replacement modifier ...) ...)
(emacs-substitute-sexps file
- ((string-append "(def[a-z]+[[:space:]\n]+" variable "\\>")
+ ((string-append "(def[a-z]+[[:space:]\n]+" variable "\\_>")
replacement
modifier ...)
...))))