From 80671b1c495ed880201177382722d99b3a1eca34 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Tue, 25 Aug 2026 18:17:50 +0300 Subject: [PATCH] Don't ignore display-warning customization for initial frame too * lisp/emacs-lisp/warnings.el (display-warning): Take into account 'warning-minimum-level' and 'warning-suppress-types' also in case of displaying daemon startup warnings on the first client frame (bug#81694). --- lisp/emacs-lisp/warnings.el | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el index 7db316acda7..c28148d5fa3 100644 --- a/lisp/emacs-lisp/warnings.el +++ b/lisp/emacs-lisp/warnings.el @@ -372,7 +372,13 @@ entirely by setting `warning-suppress-types' or (if (bolp) (forward-char -1)) (message "%s" (buffer-substring start (point)))))) - ;; Use `frame-initial-p'? + ;; Interactively, decide whether the warning merits display. + ((or (< (warning-numeric-level level) + (warning-numeric-level warning-minimum-level)) + (warning-suppress-p type warning-suppress-types)) + ;; Don't display the warning. + nil) + ;; Use `frame-initial-p'? ((and (daemonp) (eq (selected-frame) terminal-frame)) ;; Display daemon startup warnings on the first client frame. (letrec ((afterfun @@ -391,12 +397,8 @@ entirely by setting `warning-suppress-types' or (forward-char -1)) (buffer-substring start (point)))))) (t - ;; Interactively, decide whether the warning merits - ;; immediate display. - (or (< (warning-numeric-level level) - (warning-numeric-level warning-minimum-level)) - (warning-suppress-p type warning-suppress-types) - (warning--display-buffer buffer)))))))) + ;; Display immediately. + (warning--display-buffer buffer))))))) (defun warning--display-buffer (buffer) (let ((window (display-buffer