[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#39599] [PATCH 1/4] build-system: Add copy-build-system.
From: |
Pierre Neidhardt |
Subject: |
[bug#39599] [PATCH 1/4] build-system: Add copy-build-system. |
Date: |
Thu, 20 Feb 2020 11:00:32 +0100 |
Ricardo Wurmus <address@hidden> writes:
> --8<---------------cut here---------------start------------->8---
> (define* (make-file-predicate suffixes matches-regexp #:optional
> (default-value #t))
> (if (or suffixes matches-regexp)
> (let* ((suffixes (or suffixes '()))
> (regexps (map make-regexp (or matches-regexp '())))
> (predicates (append
> (map (lambda (str)
> (cut string-suffix? str <>))
> suffixes)
> (map (lambda (regexp)
> (cut regexp-exec regexp <>))
> regexps))))
> (lambda (file)
> (any (cut <> file) predicates)))
> (const default-value)))
> --8<---------------cut here---------------end--------------->8---
Good suggestion, thanks!
The logic of this function is a bit convoluted in my opinion, but I
can't think of something simpler and just as short. But since it's a
local function, I guess it's not a big deal.
> Also, as Mathieu wrote, please don’t use SET!.
No problem, but I don't recall seeing this message. Where did Mathieu
write this?
--
Pierre Neidhardt
https://ambrevar.xyz/
signature.asc
Description: PGP signature
- [bug#39599] [PATCH 1/2] build-system: Add copy-build-system., (continued)
- [bug#39599] [PATCH 1/2] build-system: Add copy-build-system., Pierre Neidhardt, 2020/02/14
- [bug#39599] [PATCH 1/4] build-system: Add copy-build-system., Pierre Neidhardt, 2020/02/17
- [bug#39599] [PATCH 3/4] gnu: Add clojure-wrapper., Pierre Neidhardt, 2020/02/17
- [bug#39599] [PATCH 4/4] gnu: net-base: Use copy build system., Pierre Neidhardt, 2020/02/17
- [bug#39599] [PATCH 2/4] gnu: gcide: Use the copy-build-system., Pierre Neidhardt, 2020/02/17
- [bug#39599] [PATCH 1/4] build-system: Add copy-build-system., Mathieu Othacehe, 2020/02/17
- [bug#39599] [PATCH 1/4] build-system: Add copy-build-system., Ricardo Wurmus, 2020/02/20
- [bug#39599] [PATCH 1/4] build-system: Add copy-build-system.,
Pierre Neidhardt <=
- [bug#39599] [PATCH 1/4] build-system: Add copy-build-system., Alex Griffin, 2020/02/19
- [bug#39599] [PATCH 1/4] build-system: Add copy-build-system., Pierre Neidhardt, 2020/02/20
- [bug#39599] [PATCH 1/4] build-system: Add copy-build-system., Mathieu Othacehe, 2020/02/20
- [bug#39599] [PATCH 1/4] build-system: Add copy-build-system., Pierre Neidhardt, 2020/02/20
- [bug#39599] [PATCH 1/4] build-system: Add copy-build-system., Julien Lepiller, 2020/02/20
- [bug#39599] [PATCH 1/4] build-system: Add copy-build-system., Pierre Neidhardt, 2020/02/20
- [bug#39599] [PATCH 1/4] build-system: Add copy-build-system., Pierre Neidhardt, 2020/02/21
- [bug#39599] [PATCH 1/4] build-system: Add copy-build-system., Nicolas Goaziou, 2020/02/21
- [bug#39599] [PATCH 1/4] build-system: Add copy-build-system., Pierre Neidhardt, 2020/02/21
- [bug#39599] [PATCH 1/4] build-system: Add copy-build-system., Nicolas Goaziou, 2020/02/21