[Top][All Lists]

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

Re: Question about defcustom and :set-after

From: Stefan Monnier
Subject: Re: Question about defcustom and :set-after
Date: Mon, 30 Apr 2018 23:54:15 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> Being entirely too lazy, I intended it to be run from a running Emacs
> session.

I understand the lazy guy wants to run it from within its session, *but*
the lazy guy wants to implement it such that it works from "emacs -Q".

So as the guy who's trying to implement it, your laziness argument
seems counterintuitive.

> The question remains, though: I think several of Gnus' defcustom's might
> need :set-after clauses.

Notice that the order in which to evaluate those settings depends on the
settings themselves, so the issue is non-trivial.

Also :set-after doesn't do what you want here: it only affects the order
in which customized vars are customized, but it doesn't cause vars to be
re-evaluated.  It's for use for example when variable B should be set
after A because setting B causes something to happen (e.g. it's a minor
mode so setting it causes the mode to be loaded and enabled, so if
B affects this minor mode, we want to set it before the mode is enabled).

What you describe is currently simply not supported by Custom :-(
You can approximate it by adding :setter functions, but it's messy,
fragile, and only solves some use cases.


reply via email to

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