|
From: | Noam Postavsky |
Subject: | bug#5950: defvaralias after defvar should be warned in runtime |
Date: | Fri, 03 Aug 2018 18:09:12 -0400 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Clément Pit-Claudel <cpitclaudel@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.
[Prev in Thread] | Current Thread | [Next in Thread] |