[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 130382779b 4/6: testing/lisp/test-duplicates-detect
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 130382779b 4/6: testing/lisp/test-duplicates-detector.el: Fix Emacs 27 compatibility |
Date: |
Sun, 11 Feb 2024 09:58:25 -0500 (EST) |
branch: externals/org
commit 130382779b881cc0afa0293060ad91b85e57e6ef
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
testing/lisp/test-duplicates-detector.el: Fix Emacs 27 compatibility
*
testing/lisp/test-duplicates-detector.el
(test-duplicates-detector--find-duplicates):
Do not use `while-let' that is not yet available in Emacs 27.
---
testing/lisp/test-duplicates-detector.el | 39 ++++++++++++++++----------------
1 file changed, 20 insertions(+), 19 deletions(-)
diff --git a/testing/lisp/test-duplicates-detector.el
b/testing/lisp/test-duplicates-detector.el
index 349b5297b4..2e9222e102 100644
--- a/testing/lisp/test-duplicates-detector.el
+++ b/testing/lisp/test-duplicates-detector.el
@@ -145,25 +145,26 @@ Duplicate forms will be written to
(goto-char (point-min))
(while (search-forward "(ert-deftest" nil t)
(goto-char (match-beginning 0))
- (ignore-errors
- (while-let ((deftest (or (read (current-buffer)) t))
- ((eq (car deftest) 'ert-deftest))
- (test-name (cadr deftest)))
- (if-let ((f (seq-find
- (lambda (x)
- (equal-including-properties
- ;; if cadddr is a docstring
- (if (stringp (cadddr deftest))
- (cddddr deftest)
- (cdddr deftest))
- (if (stringp (cadddr x))
- (cddddr x)
- (cdddr x))))
- found-deftests)))
- (push (cons test-name (cadr f)) duplicate-tests)
- (push deftest found-deftests)
- (test-duplicates-detector--search-forms-recursively
- deftest (list file test-name)))))))))
+ (let (deftest test-name)
+ (ignore-errors
+ (while (setq deftest (read (current-buffer)))
+ (setq test-name (cadr deftest))
+ (when (eq (car deftest) 'ert-deftest)
+ (if-let ((f (seq-find
+ (lambda (x)
+ (equal-including-properties
+ ;; if cadddr is a docstring
+ (if (stringp (cadddr deftest))
+ (cddddr deftest)
+ (cdddr deftest))
+ (if (stringp (cadddr x))
+ (cddddr x)
+ (cdddr x))))
+ found-deftests)))
+ (push (cons test-name (cadr f)) duplicate-tests)
+ (push deftest found-deftests)
+ (test-duplicates-detector--search-forms-recursively
+ deftest (list file test-name)))))))))))
(setq test-duplicates-detector-duplicate-forms
(seq-filter
#'cdr
- [elpa] externals/org updated (d3a1394270 -> 01a074d0b5), ELPA Syncer, 2024/02/11
- [elpa] externals/org ce1da4d201 2/6: fixup! org-startup-folded: Make values consistent with #+STARTUP keyword, ELPA Syncer, 2024/02/11
- [elpa] externals/org c2a58bbd53 1/6: org-startup-folded: Make values consistent with #+STARTUP keyword, ELPA Syncer, 2024/02/11
- [elpa] externals/org 01a074d0b5 6/6: fixup! Obsolete `org-icompleting-read' and `org-completing-read-no-i', ELPA Syncer, 2024/02/11
- [elpa] externals/org 112f1c5fcd 3/6: lisp/org-element-ast.el: Fix compilation for Emacs 27, ELPA Syncer, 2024/02/11
- [elpa] externals/org 5be39ff798 5/6: Reapply "lisp/org-element-ast.el (org-element-property-raw): Simplify implementation", ELPA Syncer, 2024/02/11
- [elpa] externals/org 130382779b 4/6: testing/lisp/test-duplicates-detector.el: Fix Emacs 27 compatibility,
ELPA Syncer <=