summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2022-10-13 21:40:56 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2022-10-13 22:16:32 +0200
commit00fa3777104cfaebeed25874390a870ba9bc8899 (patch)
tree5a2c7db9f5d0262693a58d85d022f28f47c3702c /guix
parentcf98a72774bfd45b830a718e1f5aeed6ebfaf27c (diff)
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 ...).
Diffstat (limited to 'guix')
-rw-r--r--guix/build/emacs-utils.scm2
1 files changed, 1 insertions, 1 deletions
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 ...)
...))))