From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#44849: [PATCH] Make XEmacs compat variable warning-level-aliases obsolete Date: Tue, 24 Nov 2020 12:15:56 -0800 Message-ID: References: <87v9duttuw.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19838"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44849@debbugs.gnu.org To: "Basil L. Contovounesios" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 24 21:17:13 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 1khekT-000545-OD for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Nov 2020 21:17:13 +0100 Original-Received: from localhost ([::1]:45888 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khekS-0005n3-Me for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Nov 2020 15:17:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khekI-0005jd-CW for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2020 15:17:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49815) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1khekI-000323-4W for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2020 15:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1khekI-0001kU-0Y for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2020 15:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Nov 2020 20:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44849 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 44849-submit@debbugs.gnu.org id=B44849.16062489706638 (code B ref 44849); Tue, 24 Nov 2020 20:17:01 +0000 Original-Received: (at 44849) by debbugs.gnu.org; 24 Nov 2020 20:16:10 +0000 Original-Received: from localhost ([127.0.0.1]:33123 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khejQ-0001ix-2i for submit@debbugs.gnu.org; Tue, 24 Nov 2020 15:16:10 -0500 Original-Received: from mail-ej1-f41.google.com ([209.85.218.41]:35014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khejK-0001i7-MX for 44849@debbugs.gnu.org; Tue, 24 Nov 2020 15:16:06 -0500 Original-Received: by mail-ej1-f41.google.com with SMTP id f23so30377278ejk.2 for <44849@debbugs.gnu.org>; Tue, 24 Nov 2020 12:16:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=VQ3vuL1ybcm4dwW95/DyxFN00arw6wbQYZKnZLx0KRk=; b=piGd7wJ1WBk8nhG6rOEvBLZ9914hHOY7jxTMBYzT3NKHKwG8P8mazBhdQnH8w5cXU9 VRQHlIqgTO7wauoDsfht/HGc/AI9lEA5vo0+3rCtWALQn29UGaZnXeQt8OPwJcSVOPLi nO17AssesnGNSLgOiPGR6gIclkcLYgFmAixd80xcNaCz7Ak0/wZJmryXUvE5y+gA4u2V 0p128fQfQLUmEujPcIz45iCC/LQJM2Pl7zbAyKk5j+b13KdQ8IEsXSJURmSm8yuFs1xi Tjgg/IEPdHmfP5SjcF8YTnjZRJ8iarnLKDjZNHpfHA0zKfEOZzBSF7ZGfroy39qAzmNq B7cA== X-Gm-Message-State: AOAM531a3D6otF9zmx0q6xU+F5hV8YzOwXJgxakoDBbx8o22L8N6C0Tz 83eTcTIcocVO+m+hozdWwGOmjQtb8T+nZdJtAGs= X-Google-Smtp-Source: ABdhPJyKypxwO+EnVrH8ngpAFZR/0SQxv6/e6nkh+kyUfTYONm5tOuIS0CTvtFvv4BO9CINe74vHVvlAn53tsOYC3t0= X-Received: by 2002:a17:906:614a:: with SMTP id p10mr132827ejl.312.1606248956968; Tue, 24 Nov 2020 12:15:56 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 24 Nov 2020 12:15:56 -0800 In-Reply-To: <87v9duttuw.fsf@tcd.ie> 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:194113 Archived-At: "Basil L. Contovounesios" writes: > Stefan Kangas writes: > >> @@ -256,8 +257,10 @@ display-warning >> (setq level :warning)) >> (unless buffer-name >> (setq buffer-name "*Warnings*")) >> - (if (assq level warning-level-aliases) >> - (setq level (cdr (assq level warning-level-aliases)))) >> + (with-suppressed-warnings ((obsolete warning-level-aliases)) >> + (when-let ((new (cdr-safe (assq level warning-level-aliases)))) > > Why the cdr-safe? To avoid this: (and (assq level warning-level-aliases) (cdr (assq level warning-level-aliases)))