GNU bug report logs - #5950
defvaralias after defvar should be warned in runtime

Previous Next

Package: emacs;

Reported by: irieshinsuke <at> yahoo.co.jp

Date: Thu, 15 Apr 2010 05:15:02 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 27.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #54 received at 5950 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Clément Pit-Claudel <cpitclaudel <at> gmail.com>
Cc: 5950 <at> debbugs.gnu.org, IRIE Shinsuke <irieshinsuke <at> yahoo.co.jp>,
 Noam Postavsky <npostavs <at> gmail.com>
Subject: Re: bug#5950: defvaralias after defvar should be warned in runtime
Date: Thu, 02 Aug 2018 13:03:21 -0400
>> The typical failure case goes like this, user does this:
>> 
>> (setq the-package-setting 'foo)
>> (require 'the-package)
>> 
>> And the-package.el does this:
>> 
>> (defvar the-package-real-setting 'bar)
>> ;; Oops! User's setting of `foo' is overwritten here:
>> (defvaralias 'the-package-setting 'the-package-real-setting)
>
> Thanks.  Should the warning be disabled when both variables are
> already `defvar'd, then?

Why?  Replace `setq` with `defvar` in the above scenario and you have
the same problem.


        Stefan




This bug report was last modified 6 years and 298 days ago.

Previous Next


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