Skip to content

Commit f9db661

Browse files
committed
Do not use any
It does not behave as one would expect.
1 parent 5c0e9fa commit f9db661

3 files changed

Lines changed: 14 additions & 12 deletions

File tree

lisp/forge-commands.el

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -665,9 +665,10 @@ With prefix argument MENU, also show the topic menu."
665665
$
666666
(magit-get-upstream-branch $))
667667
(car (member $ targets)))
668-
(any (##car (member (concat remote "/" %) targets))
669-
(delete-dups (cons (oref repo default-branch)
670-
magit-main-branch-names)))))))
668+
(seq-some (##car (member (concat remote "/" %) targets))
669+
(delete-dups
670+
(cons (oref repo default-branch)
671+
magit-main-branch-names)))))))
671672
(list source target)))
672673

673674
(defun forge-create-post (&optional quote)

lisp/forge-core.el

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,11 @@ Entries have the form (GITHOST APIHOST WEBHOST CLASS).
239239
If no entry matches, return nil, or signal an error if optional DEMAND
240240
is non-nil."
241241
(or (assoc host forge-alist)
242-
(assoc (any (##and (string-prefix-p "hostname" %)
243-
(substring % 9))
244-
(ignore-errors
245-
(process-lines-ignore-status "ssh" "-G" host)))
242+
(assoc (seq-some (lambda (line)
243+
(and (string-prefix-p "hostname" line)
244+
(substring line 9)))
245+
(ignore-errors
246+
(process-lines-ignore-status "ssh" "-G" host)))
246247
forge-alist)
247248
(car (cl-member host forge-alist :test #'equal :key #'caddr))
248249
(and demand

lisp/forge-github.el

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,12 +1236,12 @@
12361236
;; then taking the first found file. Too bad; that's what we do.
12371237
(let ((branch (forge--get-default-branch repo))
12381238
(case-fold-search t))
1239-
(any (lambda (file)
1240-
(and (string-match-p "\
1239+
(seq-some (lambda (file)
1240+
(and (string-match-p "\
12411241
\\`\\(.github/\\|docs/\\)?pull_request_template\\(\\.[a-zA-Z0-9]+\\)?\\'" file)
1242-
(list (concat branch ":" file))))
1243-
(magit-git-items "ls-tree" "-z" "--full-tree" "--name-only"
1244-
"-r" branch))))
1242+
(list (concat branch ":" file))))
1243+
(magit-git-items "ls-tree" "-z" "--full-tree" "--name-only"
1244+
"-r" branch))))
12451245

12461246
(cl-defmethod forge--set-default-branch ((repo forge-github-repository) branch)
12471247
(forge-rest repo "PATCH" "/repos/:owner/:repo"

0 commit comments

Comments
 (0)