  Special functions, coding theory and $t$-designs have close connections and
interesting interplay. A standard approach to constructing $t$-designs is the
use of linear codes with certain regularity. The Assmus-Mattson Theorem and the
automorphism groups are two ways for proving that a code has sufficient
regularity for supporting $t$-designs. However, some linear codes hold
$t$-designs, although they do not satisfy the conditions in the Assmus-Mattson
Theorem and do not admit a $t$-transitive or $t$-homogeneous group as a
subgroup of their automorphisms. The major objective of this paper is to
develop a theory for explaining such codes and obtaining such new codes and
hence new $t$-designs. To this end, a general theory for punctured and
shortened codes of linear codes supporting $t$-designs is established, a
generalized Assmus-Mattson theorem is developed, and a link between $2$-designs
and differentially $\delta$-uniform functions and $2$-designs is built. With
these general results, binary codes with new parameters and known weight
distributions are obtained, new $2$-designs and Steiner system $S(2, 4, 2^n)$
are produced in this paper.
