all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
Cc: emacs-devel@gnu.org
Subject: Re: Question about defcustom and :set-after
Date: Mon, 30 Apr 2018 23:54:15 -0400	[thread overview]
Message-ID: <jwvk1so11tt.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87muxk17oz.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Mon, 30 Apr 2018 18:33:00 -0700")

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


        Stefan



  reply	other threads:[~2018-05-01  3:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-01  0:00 Question about defcustom and :set-after Eric Abrahamsen
2018-05-01  0:37 ` Stefan Monnier
2018-05-01  1:33   ` Eric Abrahamsen
2018-05-01  3:54     ` Stefan Monnier [this message]
2018-05-01 16:20       ` Eric Abrahamsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvk1so11tt.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=eric@ericabrahamsen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.