emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Have Customize always use `custom-file`


From: Drew Adams
Subject: Re: Have Customize always use `custom-file`
Date: Mon, 3 Jan 2022 17:55:01 +0000

> > For problems:
> >
> https://urldefense.com/v3/__https://stackoverflow.com/questions/32693757/ema
> cs-package-customization-and-
> autoloads__;!!ACWV5N9M2RV99hQ!ch4K0byKujWHfMCY7DyWs5dx-
> 3h5iPQestwjvN1CHmMk0tDfWAo_lOk7FaJddxMS$
> 
> Sorry for nonfree link.  TLDR: Stefan mentions existence quirks and corner
> cases on some interactions of autoloading and Customize.  Experto credite.

As I said, I answered the question posed at that link,
there.

What the user asking that question did was reasonable.

Users can control the behavior.  If you put a defcustom
sexp in an autoloads file, then you need to know, and
perhaps pay attention to, when that file gets loaded.

There's nothing mystical about this.  The behavior of
a defcustom sexp, like any other Lisp code, can depend
on code that's been previously evaluated (e.g. loaded).

That applies to a defcustom that's autoloaded as much
as to one that's loaded/evaluated in some other way.

If a defcustom expects things to exist, or things to
have happened already, when it's evaluated, then you
need to make sure those things exist or have happened. 

Stefan's advice to not autoload defcustom sexps is
perfectly fine to follow.  It can also be fine to
autoload some defcustoms - but in that case you of
course need to pay attention to evaluation/load order
etc.

Emacs Lisp gives you plenty of rope to hang yourself
with.  You're not obliged to hang yourself, however.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]