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 #69 received at 5950 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Clément Pit-Claudel <cpitclaudel <at> gmail.com>
Cc: IRIE Shinsuke <irieshinsuke <at> yahoo.co.jp>, 5950 <at> debbugs.gnu.org,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#5950: defvaralias after defvar should be warned in runtime
Date: Fri, 03 Aug 2018 18:09:12 -0400
Clément Pit-Claudel <cpitclaudel <at> gmail.com> writes:

> But why would a user write 'defvar' to set a user variable?

I don't know, why would a user write 'defvaralias' to set a user
variable?  They're users, completely unpredictable!  ;)

> What's the proper way to resolve it?  Should I create the alias before
> loading flycheck?

That would work too.  I made a couple of other suggestions in
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=5950#42

Maybe we should add something like

    (defun defvaralias! (new-alias base-variable &optional docstring)
      (set new-alias (symbol-value base-variable))
      (defvaralias new-alias base-variable docstring))

Which you could use to tell Emacs not to care about losing the original
value of NEW-ALIAS.




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.