Subject: Re: bug#5950: defvaralias after defvar should be warned in runtime

From: Stefan Monnier <[email-masked]>
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