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 ...).
This commit is contained in:
parent
cf98a72774
commit
00fa377710
@ -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 ...)
|
||||
...))))
|
||||
|
Loading…
Reference in New Issue
Block a user