We follow a post hoc, .user-agnostic. approach to false discovery control in a large-scale multiple testing framework, as introduced by Genovese and Wasserman [J. Amer. Statist. Assoc. 101 (2006) 1408.1417], Goeman and Solari [Statist. Sci. 26 (2011) 584.597]: the statistical guarantee on the number of correct rejections must hold for any set of candidate items, possibly selected by the user after having seen the data. To this end, we introduce a novel point of view based on a family of reference rejection sets and a suitable criterion, namely the joint familywise error rate over that family (JER for short). First, we establish how to derive post hoc bounds from a given JER control and analyze some general properties of this approach. We then develop procedures for controlling the JER in the case where reference regions are p-value level sets. These procedures adapt to dependencies and to the unknown quantity of signal (via a step-down principle). We also show interesting connections to confidence envelopes of Meinshausen [Scand. J. Stat. 33 (2006) 227.237]; Genovese and Wasserman [J. Amer. Statist. Assoc. 101 (2006) 1408.1417], the closed testing based approach of Goeman and Solari [Statist. Sci. 26 (2011) 584.597] and to the higher criticism of Donoho and Jin [Ann. Statist. 32 (2004) 962.994]. Our theoretical statements are supported by numerical experiments.