mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
etc: teams: Fix regexp match and execution.
This is a follow up to commit 4d7b25a0
("etc: teams: Sort and improve display
of regular expression in 'scope' field.").
* etc/teams.scm.in (regexp-exec*): Rename to...
(regexp*-exec): ... this.
(find-team-by-scope): Replace regexp? with regexp*?. Replace regexp-exec with
regexp*-exec.
This commit is contained in:
parent
d72c3fcf2d
commit
d6966b8a5b
1 changed files with 3 additions and 3 deletions
|
@ -53,7 +53,7 @@ (define* (make-regexp* pat #:optional (flag regexp/extended))
|
||||||
"Alternative to `make-regexp' producing annotated <regexp*> objects."
|
"Alternative to `make-regexp' producing annotated <regexp*> objects."
|
||||||
(%make-regexp* pat flag (make-regexp pat flag)))
|
(%make-regexp* pat flag (make-regexp pat flag)))
|
||||||
|
|
||||||
(define (regexp-exec* rx* str)
|
(define (regexp*-exec rx* str)
|
||||||
"Execute the RX* regexp, a <regexp*> object."
|
"Execute the RX* regexp, a <regexp*> object."
|
||||||
(regexp-exec (regexp*-rx rx*) str))
|
(regexp-exec (regexp*-rx rx*) str))
|
||||||
|
|
||||||
|
@ -653,8 +653,8 @@ (define (find-team-by-scope files)
|
||||||
(any (match-lambda
|
(any (match-lambda
|
||||||
((? string? scope)
|
((? string? scope)
|
||||||
(string=? scope file))
|
(string=? scope file))
|
||||||
((? regexp? scope)
|
((? regexp*? scope)
|
||||||
(regexp-exec scope file)))
|
(regexp*-exec scope file)))
|
||||||
(team-scope team)))
|
(team-scope team)))
|
||||||
files)
|
files)
|
||||||
(cons team acc)
|
(cons team acc)
|
||||||
|
|
Loading…
Reference in a new issue