[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/relint d29dd3757f 4/4: Suppress warning messages from m
From: |
ELPA Syncer |
Subject: |
[elpa] externals/relint d29dd3757f 4/4: Suppress warning messages from macro-expansion |
Date: |
Sun, 25 Sep 2022 05:58:03 -0400 (EDT) |
branch: externals/relint
commit d29dd3757f83a2915e3940ed7000fd268bd6d267
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
Suppress warning messages from macro-expansion
These are typically from macros complaining about bad usage.
They will just confuse the user, and will be emitted (with more
accurate location) during byte-compilation anyway.
---
relint.el | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/relint.el b/relint.el
index 6ef986fdc5..1883159b6d 100644
--- a/relint.el
+++ b/relint.el
@@ -761,13 +761,18 @@ not be evaluated safely."
\` backquote-list*
letrec
cl-case cl-loop cl-block cl-flet cl-flet* cl-labels))
- (relint--eval (macroexpand-1 form)))
+ (relint--eval
+ ;; Suppress any warning message arising from macro-expansion;
+ ;; it will just confuse the user and we can't give a good location.
+ (let ((inhibit-message t))
+ (macroexpand-1 form))))
;; Expanding pcase can fail if it uses user-defined pcase macros.
((memq head '(pcase pcase-let pcase-let* pcase--flip))
(relint--eval
(condition-case nil
- (macroexpand-1 form)
+ (let ((inhibit-message t))
+ (macroexpand-1 form))
(error (throw 'relint-eval 'no-value)))))
;; catch: as long as nobody throws, this naïve code is fine.
@@ -1055,7 +1060,8 @@ evaluated are nil."
(relint--eval-list (cadr form)))
((memq (car form) '(\` backquote-list*))
- (relint--eval-list (macroexpand-1 form)))
+ (relint--eval-list (let ((inhibit-message t))
+ (macroexpand-1 form))))
((assq (car form) relint--safe-alternatives)
(relint--eval-list (cons (cdr (assq (car form) relint--safe-alternatives))