mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
lint: Pre-compile regexp for ‘starts-with-texinfo-markup?’.
* guix/lint.scm (%starts-with-texinfo-markup-rx): New variable. (starts-with-texinfo-markup?): Use it. Change-Id: I1b7a836ba968631f3f358a88a29e996d431b0001
This commit is contained in:
parent
287be00630
commit
8cbbe12eff
1 changed files with 4 additions and 1 deletions
|
@ -370,8 +370,11 @@ superfluous when building natively and incorrect when cross-compiling."
|
|||
(define (properly-starts-sentence? s)
|
||||
(string-match "^[(\"'`[:upper:][:digit:]]" s))
|
||||
|
||||
(define %starts-with-texinfo-markup-rx
|
||||
(make-regexp "^@(acronym|dfn|code|command|emph|file|quotation|samp|uref|url)\\{.*?\\}"))
|
||||
|
||||
(define (starts-with-texinfo-markup? s)
|
||||
(string-match "^@(acronym|dfn|code|command|emph|file|quotation|samp|uref|url)\\{.*?\\}" s))
|
||||
(regexp-exec %starts-with-texinfo-markup-rx s))
|
||||
|
||||
(define (starts-with-abbreviation? s)
|
||||
"Return #t if S starts with what looks like an abbreviation or acronym."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue