From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: No Wayman Newsgroups: gmane.emacs.bugs Subject: bug#43467: [PATCH] defcustom warning-show-suppression-buttons correction Date: Thu, 17 Sep 2020 12:04:20 -0400 Message-ID: <87d02k2xvf.fsf@gmail.com> References: <87363g8krw.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17156"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.5.5; emacs 28.0.50 To: 43467@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 17 18:08:45 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kIwSj-0004Mz-8z for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Sep 2020 18:08:45 +0200 Original-Received: from localhost ([::1]:49124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIwSi-0006Gf-9e for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Sep 2020 12:08:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIwP8-0001ut-Ke for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2020 12:05:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55452) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIwP8-0004zl-3c for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2020 12:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kIwP7-00039n-Vn for bug-gnu-emacs@gnu.org; Thu, 17 Sep 2020 12:05:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87363g8krw.fsf@gmail.com> Resent-From: No Wayman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Sep 2020 16:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43467 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 43467-submit@debbugs.gnu.org id=B43467.160035867112074 (code B ref 43467); Thu, 17 Sep 2020 16:05:01 +0000 Original-Received: (at 43467) by debbugs.gnu.org; 17 Sep 2020 16:04:31 +0000 Original-Received: from localhost ([127.0.0.1]:38765 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIwOc-00038g-RG for submit@debbugs.gnu.org; Thu, 17 Sep 2020 12:04:31 -0400 Original-Received: from mail-qv1-f52.google.com ([209.85.219.52]:46260) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIwOZ-00038O-Tf for 43467@debbugs.gnu.org; Thu, 17 Sep 2020 12:04:29 -0400 Original-Received: by mail-qv1-f52.google.com with SMTP id di5so1213926qvb.13 for <43467@debbugs.gnu.org>; Thu, 17 Sep 2020 09:04:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:message-id:date:mime-version; bh=ZEbsoZSR8yzLExFEbOnvHKTpz+hh8IfQnaBK9BVxzME=; b=aIeYZrSuee5KFXuC0nV7zUlqXqAnzN1BfsxAuSepoc+lt2thSSaprxMLw8qxwjr81a 6rNM7K36myyunAXlrk53pczfHBvfVxqm9OuizbuPPuoXyVgdo+Nema2tOBoaidL5pKfl ZEGV451mWBFVS39gqsTbVxw4f/h3weQL7BcNeFEPZfmxUsqI/D3uwiEu9uv+F+gnHcjH pue3yHNpWd/tVjOOws/d9Q54C13jR0L7LaGUKDaGc9qQeekft3qsvtniRZbcmADGWa/8 if67L9eGZ49W/Qvnbv/fs0/lWbVb47I61CHd4aXSdGzYRneOKYL12httz+m3+tJWC55o Jl8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:message-id:date :mime-version; bh=ZEbsoZSR8yzLExFEbOnvHKTpz+hh8IfQnaBK9BVxzME=; b=iuhYHlvd85JGEKsiC7jxlAFxsaKBAiqHOMzUB7HfLdXyYL8h416jelipyyAC8L0YiQ Hn5D4Az5UNuHRQpw27D7mTySdmghAHAZ2fP5ygLkax8N6uye1fyJXvJyvqO5Z9p5m7Y9 KLyBnE1j7/8Fq5Kin/r+rZYgCex1a/BA+fTFzP1IxQQhXmfF0hybh002kybyeGyzUpZ8 Uwipg8f32/9Nh4Ttiy17iNn9No2EswWe6K+WnSsnWTCtg8rVw1xhe/PJg8U9cpXKzMjo bqX8cFoQinbhD+mE7ngJURt/aHBOeU1QHRJcoTOc0WVOiNDwbxpBcd+33/SjyfPlEx+w 5wGg== X-Gm-Message-State: AOAM533wtxUPAYJrPJ6iwxSGHZChUvwxGZS8Iyx9u4M0kWg6/PrkGuSY 9sVKp9Bgb+7e3DrlWBE+GJ7YmiNZGFaYvw== X-Google-Smtp-Source: ABdhPJzF3A3OP6FLjQnArVBIZ85AJcB2E9nH4OXY5TUv6MeFE6Mgc01wicoMToS3aEqVSIveRy+ZLg== X-Received: by 2002:a0c:ee86:: with SMTP id u6mr12994193qvr.56.1600358661967; Thu, 17 Sep 2020 09:04:21 -0700 (PDT) Original-Received: from arch ([2601:8b:c300:1024:1266:d0ff:1635:f964]) by smtp.gmail.com with ESMTPSA id t140sm116115qke.125.2020.09.17.09.04.20 for <43467@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Sep 2020 09:04:21 -0700 (PDT) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:188218 Archived-At: --=-=-= Content-Type: text/plain; format=flowed Sorry, just woke up. The attached patch corrects the logic of the first one. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-warning-show-suppression-buttons-defcustom.patch Content-Description: warning-show-suppression-buttons-correction >From 0f5caefcfe496ebccfedf24cfc75b249e1e7bf76 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..8ed4e425f3 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 (not warning-show-suppression-buttons)) (insert " ") (insert-button "Disable showing" 'type 'warning-suppress-warning -- 2.28.0 --=-=-=--