[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/logview 9f879fd2a2 250/259: Fix a byte-compilation warning
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/logview 9f879fd2a2 250/259: Fix a byte-compilation warning in the last commit. |
Date: |
Fri, 31 Jan 2025 07:02:21 -0500 (EST) |
branch: elpa/logview
commit 9f879fd2a2bd460e76d924a8dce1e410c3733626
Author: Paul Pogonyshev <pogonyshev@gmail.com>
Commit: Paul Pogonyshev <pogonyshev@gmail.com>
Fix a byte-compilation warning in the last commit.
---
test/logview.el | 65 +++++++++++++++++++++++++++++----------------------------
1 file changed, 33 insertions(+), 32 deletions(-)
diff --git a/test/logview.el b/test/logview.el
index 5561f5f10f..b5224c882c 100644
--- a/test/logview.el
+++ b/test/logview.el
@@ -31,39 +31,40 @@
;; Copied from Eldev source code, see documentation there.
-(defmacro logview--advised (spec &rest body)
- (declare (indent 1) (debug (sexp body)))
- (let ((symbol (nth 0 spec))
- (where (nth 1 spec))
- (function (nth 2 spec))
- (props (nthcdr 3 spec))
- (fn (make-symbol "$fn")))
- `(let ((,fn ,function))
- (when ,fn
- (if (advice-member-p ,fn ,symbol)
- (setf ,fn nil)
- (advice-add ,symbol ,where ,fn ,@props)))
- (unwind-protect
- ,(macroexp-progn body)
+(eval-when-compile
+ (defmacro logview--advised (spec &rest body)
+ (declare (indent 1) (debug (sexp body)))
+ (let ((symbol (nth 0 spec))
+ (where (nth 1 spec))
+ (function (nth 2 spec))
+ (props (nthcdr 3 spec))
+ (fn (make-symbol "$fn")))
+ `(let ((,fn ,function))
(when ,fn
- (advice-remove ,symbol ,fn))))))
-
-(defmacro logview-ert-defargtest (name arguments values &rest body)
- (declare (indent 3))
- (let ((function (make-symbol (format "%s:impl" name))))
- `(progn
- ;; Implementation of `skip-unless' is copied from Emacs source.
- (cl-macrolet ((skip-unless (form) `(ert--skip-unless ,form)))
- ;; Apparently we cannot get away with unnamed lambdas here.
- (defun ,function ,arguments ,@body))
- ,@(mapcar (lambda (arg-values)
- `(ert-deftest ,(intern (format "%s/%s" name
(logview--ert-defargtest-format-arguments arg-values))) ()
- (,function ,@(if (= (length arguments) 1) (list
arg-values) arg-values))))
- values))))
-
-(defun logview--ert-defargtest-format-arguments (arguments)
- (let ((print-quoted t))
- (downcase (replace-regexp-in-string " " "/" (replace-regexp-in-string (rx
(not (any word "-" " "))) "" (prin1-to-string arguments))))))
+ (if (advice-member-p ,fn ,symbol)
+ (setf ,fn nil)
+ (advice-add ,symbol ,where ,fn ,@props)))
+ (unwind-protect
+ ,(macroexp-progn body)
+ (when ,fn
+ (advice-remove ,symbol ,fn))))))
+
+ (defmacro logview-ert-defargtest (name arguments values &rest body)
+ (declare (indent 3))
+ (let ((function (make-symbol (format "%s:impl" name))))
+ `(progn
+ ;; Implementation of `skip-unless' is copied from Emacs source.
+ (cl-macrolet ((skip-unless (form) `(ert--skip-unless ,form)))
+ ;; Apparently we cannot get away with unnamed lambdas here.
+ (defun ,function ,arguments ,@body))
+ ,@(mapcar (lambda (arg-values)
+ `(ert-deftest ,(intern (format "%s/%s" name
(logview--ert-defargtest-format-arguments arg-values))) ()
+ (,function ,@(if (= (length arguments) 1) (list
arg-values) arg-values))))
+ values))))
+
+ (defun logview--ert-defargtest-format-arguments (arguments)
+ (let ((print-quoted t))
+ (downcase (replace-regexp-in-string " " "/" (replace-regexp-in-string
(rx (not (any word "-" " "))) "" (prin1-to-string arguments)))))))
(defmacro logview--test-with-restriction (start end locking-label &rest body)
- [nongnu] elpa/logview 03b2f0fc32 040/259: Improve 'logview--entry-regexp' building to allow one level of nested parens inside thread or class name. Fixes #2., (continued)
- [nongnu] elpa/logview 03b2f0fc32 040/259: Improve 'logview--entry-regexp' building to allow one level of nested parens inside thread or class name. Fixes #2., ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview cd63640f3a 049/259: Bump version to put pretty significant improvements provided by 'datetime' library to "stable" state., ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview c3edc542ff 098/259: Rewrite the last commit to silence yet another warning., ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview 8d91b86de4 143/259: Rewrite automatic submode reguessing to run only when Emacs is idle, since this can now take non-trivial amount of time., ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview 0a1b3a8268 164/259: Prevent certain errors on Emacs 29 (up to a full freeze) by preventively disabling its long-line optimization; fail fast if that doesn't help., ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview 3620b1ff3b 191/259: Adapt to Java 17 changes as much as possible (in `datetime' 0.8; also require that version to ensure we deal only with Java 17 data)., ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview 673c90b48a 201/259: Experimentally preview filtering results when editing filters in a separate buffer., ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview 46897e0a7c 195/259: Bump actions/checkout from 2 to 3, ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview 00b3b01dfc 216/259: Post-release version bump., ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview 506dd5f1be 232/259: Post-release version bump., ELPA Syncer, 2025/01/31
- [nongnu] elpa/logview 9f879fd2a2 250/259: Fix a byte-compilation warning in the last commit.,
ELPA Syncer <=
- [nongnu] elpa/logview fad1144bdb 246/259: Also test on Emacs 29.4., ELPA Syncer, 2025/01/31