tags 5950 + patch quit Stefan Monnier writes: > Changing defvaralias to try and be more clever would definitely > be wrong. But changing it to output a warning about the problematic > situation would be OK and changing the byte-compiler to output a warning > in cases that make such a situation more likely is also perfectly good. I see the byte-compiler side of this has been taken care of [1..4], but I still managed to make this mistake when I made a cross-file alias (Bug#31603). Here's a patch for the runtime warning. While writing it, I found that invoking `display-warning' failed during bootstrap, so the first commit works around that. In the end it's not strictly necessary, because I added a check to suppress the warning when the two variables have `eq' values, so no warnings are generated during bootstrap anyway. The bootstrap warnings were about cl-custom-print-functions, mail-dont-reply-to-names, and several flymake-proc-* variables all of which correctly have the alias before the definition. This makes me think I might be doing something wrong, but it seems to do the right thing in my tests.