In every undergraduate level Calculus book I've seen (Stewart, Thomas, Larson/Edwards, etc.), single-variable limits are defined to exist on open intervals which forbids finding limits at endpoints of intervals. Limits at endpoints require a "one-sided limit" in these books. Curiously, all of these same books allow multivariable limits to exist on not-necessarily-open sets, allowing limits to exist at boundary points (so their multivariable definition does not restrict naturally to their single variable definition).
There are several threads on this site that discuss taking limits at endpoints, often resolving with "It depends on how you define a limit."
My question is: Why do undergraduate texts require open intervals for limits? Or, perhaps more generally, why do some prefer a definition that requires an open interval? Is there a historical perspective that motivates this?
Assume that a set $\Omega\subset{\mathbb R}^n$, a function $f:\>\Omega\to{\mathbb R}$, and a point $\xi\in{\mathbb R}^n$ are given. It may be that $f$ a priori is defined on some larger set $\Omega'\supset\Omega$, but that for some special reasons we momentarily consider $f(x)$ only for points $x\in \Omega$.
If $\xi\notin\overline{\Omega}$, i.e., if there is an $\epsilon_0>0$ such that $|\xi-x|\geq\epsilon_0$ for all $x\in\Omega$, then it makes no sense to consider the limit $\lim_{x\to\xi} f(x)$.
If, however $\xi\in\overline{\Omega}$, then there are are points $x\in\Omega$ arbitrarily near $\xi$, and it makes sense to consider $\lim_{x\to\xi} f(x)$. By definition, $$\lim_{x\to\xi}f(x)=L\quad\Leftrightarrow\quad\ldots$$ where the $\ldots$ express that for any $\epsilon>0$ there has to be a $\delta>0$ such that $$x\in\Omega\quad\wedge\quad0<|x-\xi|<\delta\qquad\Rightarrow\quad |f(x)-L|<\epsilon\ .$$ This is the general definition of limit, and it encompasses one-sided limits, limits at boundary points, etc., as well. (Only $\xi=\pm\infty$ is not covered.) The limit defined in "calculus books" may be restricted to more special situations, but it must not differ from the general idea presented here.