emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/compat 0b9ee25ccc: Additional workflow checks


From: ELPA Syncer
Subject: [elpa] externals/compat 0b9ee25ccc: Additional workflow checks
Date: Sat, 11 Feb 2023 06:57:24 -0500 (EST)

branch: externals/compat
commit 0b9ee25cccd88e6ba01eb8c3ad9a04ad376df417
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Additional workflow checks
---
 .github/workflows/makefile.yml | 6 ++++--
 Makefile                       | 6 ++++++
 compat-macs.el                 | 4 ++--
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml
index 17e9df5318..3fcf761133 100644
--- a/.github/workflows/makefile.yml
+++ b/.github/workflows/makefile.yml
@@ -39,13 +39,15 @@ jobs:
     - name: Provide seq.el on Emacs 24
       if: ${{ startsWith(matrix.emacs-version, '24.') }}
       run: mv .github/workflows/seq-24.el seq.el
+    - name: Basic checks
+      run: make check
     - name: Run interpreted tests
       run: make test
-    - name: Compile
+    - name: Byte compile all files
       run: |
         sed -i "s/ no-byte-compile: t;//" compat-macs.el compat-tests.el
         make compile
     - name: Run compiled tests
       run: make test
-    - name: Make info
+    - name: Make info manual
       run: make compat.info
diff --git a/Makefile b/Makefile
index 85907f6c5a..2368b20f8e 100644
--- a/Makefile
+++ b/Makefile
@@ -24,6 +24,12 @@ test:
 clean:
        $(RM) $(BYTEC) compat.info
 
+check:
+       @echo "Check: All definitions must be marked with tests"
+       @! (grep -P "^\\(compat-(def|guard)" *.el | grep -v "compat-tests:")
+       @echo "Check: All definitions must use (compat-def* macros"
+       @! (grep -P "^\\(def" compat-[0-9][0-9].el)
+
 $(BYTEC): compat-macs.el
 
 .el.elc:
diff --git a/compat-macs.el b/compat-macs.el
index 1148603d15..f34cb0d464 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -61,8 +61,8 @@ See (compat) Emacs %s' for more details.]\n\n%s"
   "Check ATTRS given PREDS predicate plist and return rest."
   (while (keywordp (car attrs))
     (compat-macs--assert (cdr attrs) "Attribute list length is odd")
-    (compat-macs--assert (when-let ((p (plist-get preds (car attrs))))
-                           (or (eq p t) (funcall p (cadr attrs))))
+    (compat-macs--assert (let ((p (plist-get preds (car attrs))))
+                           (and p (or (eq p t) (funcall p (cadr attrs)))))
                          "Invalid attribute %s" (car attrs))
     (setq attrs (cddr attrs)))
   attrs)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]