From 00fa3777104cfaebeed25874390a870ba9bc8899 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Thu, 13 Oct 2022 21:40:56 +0200 Subject: 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(-) (limited to 'guix/build') 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 ...) ...)))) -- cgit v1.2.3