Let X be some topological space. Let A be a subspace of X. I am thinking about the following: If f is a cts function from X to X, and g a cts function from X to A, when is the piece-wise function h(x) = f(x) if x is not in A, g(x) if x is in A continuous? My intuition tells me they must agree on the closure (or maybe boundary?) of A? If not, any idea?