emacs-devel
[Top][All Lists]
Advanced

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

Re: Question about defcustom and :set-after


From: Eric Abrahamsen
Subject: Re: Question about defcustom and :set-after
Date: Tue, 01 May 2018 09:20:11 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> 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.

I thought working very hard in the pursuit of ultimately laziness was
the essence of programming :)

I'll just do an "emacs -Q" version for now, and leave the excessive
cleverness for later. Once I've got a basic working version, I'll put up
a bug report.

>> 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.

That's too bad. At least in this case, if I'm not trying to make Gnus
mock shadow an existing Gnus setup, this won't be a problem.

Thanks,
Eric




reply via email to

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