GNU bug report logs -
#77917
31.0.50; [PATCH] Stop using the "stop" sign for all warning levels
Previous Next
Reported by: Protesilaos Stavrou <prot <at> protesilaos.com>
Date: Sat, 19 Apr 2025 07:25:02 UTC
Severity: normal
Tags: patch
Found in version 31.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #139 received at 77917 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
>>> (define-icon warnings-suppress button
>>> - `((emoji "⛔")
>>> + `((emoji "⚠️")
> [...]
> Re-reading your patch, I realized your patch does exactly what
> I described. Maybe we should rename the icon so it doesn’t say
> suppress.
Unfortunately, renaming an icon is not so simple.
First we need to mark an old name as obsolete
because very likely many users already customized it
with 'M-x customize-icon RET warnings-suppress RET'
that adds to the custom file a setting like this:
(custom-set-icons
'(warnings-suppress ((emoji "⚠️") (symbol " ■ ") (text " stop "))))
And I even don't know how to make it obsolete.
For example, there is 'define-obsolete-face-alias',
but no something like 'define-obsolete-icon-alias'.
> And for the symbol we could use ⚠.
Thanks. I tried to find a suitable character for the symbol,
but didn't realize this could be used for it.
Here is the patch that also updates the docstring:
[warnings-suppress.patch (text/x-diff, inline)]
diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el
index 6c77d57a6ba..54a35fee3a9 100644
--- a/lisp/emacs-lisp/warnings.el
+++ b/lisp/emacs-lisp/warnings.el
@@ -216,15 +216,15 @@ warning-suppress-p
some-match))
(define-icon warnings-suppress button
- `((emoji "⛔")
- ;; Many MS-Windows console fonts don't have good glyphs for U+25A0.
+ `((emoji "⚠️")
+ ;; Many MS-Windows console fonts don't have good glyphs for symbols.
(symbol ,(if (and (eq system-type 'windows-nt)
(null window-system))
" » "
- " ■ "))
- (text " stop "))
- "Suppress warnings."
- :version "29.1"
+ " ⚠ "))
+ (text " warning "))
+ "Indicate and optionally suppress warnings."
+ :version "31.1"
:help-echo "Click to suppress this warning type")
(defun warnings-suppress (type)
@@ -333,7 +333,16 @@ display-warning
(insert (format (nth 1 level-info)
(format warning-type-format typename))
message)
- (funcall newline)
+ ;; Don't output the buttons when doing batch compilation
+ ;; and similar.
+ (unless (or noninteractive (eq type 'bytecomp))
+ (insert " " (buttonize (propertize
+ "[Suppress]" 'face
+ '(variable-pitch (:height 0.9)))
+ #'warnings-suppress type)
+ "\n"))
+ (unless (bolp)
+ (funcall newline))
(when (and warning-fill-prefix
(not (string-search "\n" message))
(not noninteractive))
This bug report was last modified 12 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.