Subject: Re: bug#35628: Keep track of what file sets variables... through init-file processing

From: Noam Postavsky <[email-masked]>
Date: Wed, 08 May 2019 07:00:09 -0400

forcemerge 29495 35628
quit

積丹尼 Dan Jacobson <[email-masked]> writes:

> C-h v runs the command describe-variable.
>
> Its output looks like
>
>    ............. is a variable defined in ‘.......el’.
>    Its value is t
>    Original value was nil

> Try this: put (setq xxxx 2222) in ~/.emacs; restart emacs, and do
> describe-variable xxxx.
>
> You might say "Well we only remember one filename. If we remember
> .emacs, then we will forget the original file."

Only defvar, defcustom, or defconst record a variable definition
filename; setq records nothing (technically, it doesn't "define" a
variable, just changes it).  Maybe something could be hacked with
add-variable-watcher (not sure if it's a good idea though).