>From 74b2cce64bb0a1c6a65749b055078e5b1c326160 Mon Sep 17 00:00:00 2001 From: Nicholas Vollmer Date: Thu, 17 Sep 2020 11:40:41 -0400 Subject: [PATCH] Allow customization of warning suppression button display * lisp/emacs-lisp/warnings.el (warning-show-suppression-buttons): new defcustom to disable/enable display of warning suppression buttons in *Warnings* buffer. --- lisp/emacs-lisp/warnings.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el index e10c149d89..35e9870d1a 100644 --- a/lisp/emacs-lisp/warnings.el +++ b/lisp/emacs-lisp/warnings.el @@ -116,6 +116,11 @@ warning-suppress-types See also `warning-suppress-log-types'." :type '(repeat (repeat symbol)) :version "22.1") + +(defcustom warning-show-suppression-buttons t + "Whether or not to show suppresion buttons in the *Warnings* buffer. +If t, buttons are shown, else they are not." + :type 'boolean) ;; The autoload cookie is so that programs can bind this variable ;; safely, testing the existing value, before they call one of the @@ -294,7 +299,7 @@ display-warning message) ;; Don't output the buttons when doing batch compilation ;; and similar. - (unless noninteractive + (unless (or noninteractive warning-show-suppression-buttons) (insert " ") (insert-button "Disable showing" 'type 'warning-suppress-warning -- 2.28.0