[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: help with add-to-list syntax
From: |
Michael Heerdegen |
Subject: |
Re: help with add-to-list syntax |
Date: |
Thu, 31 Oct 2024 11:35:14 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
BP25 <bp25@riseup.net> writes:
> Hello! Could any of you be so kind as to help me understand this,
> please? I have
>
> (custom-set-variables
> '(warning-suppress-types '((undo\ discard-info))))
>
> in my .emacs. If I start emacs, do load-file .emacs, then evaluate
> (add-to-list 'warning-suppress-types '(undo\ discard-info)) I get an
> error saying the variable warning-suppress-types is void.
After thinking about this again:
The explanation for your little miracle is probably that the variable is
autoloaded and the defining library "warnings" not necessarily loaded at
startup. `custom-set-variables' is clever enough to do the right thing
anyway. C-h v loads the defining library as a side effect so you always
see a defined variable even when it had not yet been defined.
The details may differ a bit depending on your Emacs version.
Michael.