From 4321c0c888d98c03c29402ebce81abe85765a0ec Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Mon, 7 Jul 2025 11:04:19 +0200 Subject: [PATCH] Turn compiler macro defalias messages into warnings * lisp/emacs-lisp/bytecomp.el (byte-compile-file-form-defalias): Turn messages into warnings to make them more visible to the user and provide a source location (bug#78792). (cherry picked from commit 0de646b6a16dac8cf185c32b02d4d575830c6a31) --- lisp/emacs-lisp/bytecomp.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 70102be4318..cad274da533 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -5209,8 +5209,10 @@ binding slots have been popped." name macro arglist body rest) (when macro (if (null fun) - (message "Macro %s unrecognized, won't work in file" name) - (message "Macro %s partly recognized, trying our luck" name) + (byte-compile-warn-x + name "Macro %s unrecognized, won't work in file" name) + (byte-compile-warn-x + name "Macro %s partly recognized, trying our luck" name) (push (cons name (eval fun lexical-binding)) byte-compile-macro-environment))) (byte-compile-keep-pending form)))) -- 2.39.5