all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Merten <smerten@oekonux.de>
To: emacs-devel@gnu.org
Cc: Jonathan Yavner <jyavner@member.fsf.org>
Subject: Re: testcover: setf-method and treatment of `defcustom'
Date: Wed, 12 Sep 2012 21:32:47 +0200	[thread overview]
Message-ID: <6642.1347478367@theowa.merten-home.homelinux.org> (raw)
In-Reply-To: <6900.1347261102@theowa.merten-home.homelinux.org>

[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]

Hi!

2 days ago Stefan Merten wrote:
> I still had another error left, however.
> 
> 	 Value of form marked with `1value' does vary: ...
> 
> It took me some time to discover that for some reason `testcover'
> treats `defcustom' like `defconst'. This is of course lethal for a
> test which changes a customizable variable temporarily - e.g. by `let'
> - to test a certain functionality.

I now used `testcover' intensively and can see why there is a wish to
treat a `defcustom' like a `defconst'. If you treat a `defcustom' like
a normal `defvar' you get a brown splotch (i.e. the form had only a
single value) for all the `defcustom' variables. This is annoying.

OTOH in automated tests you *want* to override a `defcustom' to test
behavior with a different customization. So treating `defcustom' as
`defconst' unconditionally is certainly not an option.

The natural thing which comes to mind is to create a configuration
option here. For instance there could be another customizable
`testcover' variable which lists all the `defcustom' variables you
*do* want to treat as a variable.

How does this sound?


						Grüße

						Stefan

[-- Attachment #2: Type: application/pgp-signature, Size: 307 bytes --]

      parent reply	other threads:[~2012-09-12 19:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-10  7:11 testcover: setf-method and treatment of `defcustom' Stefan Merten
2012-09-11  3:40 ` Stefan Monnier
2012-09-12 20:38   ` Stefan Merten
2012-09-13 13:09     ` Stefan Monnier
2012-09-13 20:45       ` Stefan Merten
2012-09-16  9:06   ` Stefan Merten
2012-09-18 21:37     ` Stefan Monnier
2012-09-12 19:32 ` Stefan Merten [this message]

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=6642.1347478367@theowa.merten-home.homelinux.org \
    --to=smerten@oekonux.de \
    --cc=emacs-devel@gnu.org \
    --cc=jyavner@member.fsf.org \
    /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.