GNU bug report logs - #44849
[PATCH] Make XEmacs compat variable warning-level-aliases obsolete

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefan <at> marxist.se>

Date: Tue, 24 Nov 2020 18:10:01 UTC

Severity: wishlist

Tags: fixed, patch

Fixed in version 28.1

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Kangas <stefan <at> marxist.se>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: 44849 <at> debbugs.gnu.org
Subject: bug#44849: [PATCH] Make XEmacs compat variable warning-level-aliases obsolete
Date: Tue, 24 Nov 2020 12:15:56 -0800
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:

> Stefan Kangas <stefan <at> marxist.se> 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)))




This bug report was last modified 4 years and 157 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.