  In this work we prove that if $X$ is a complete locally convex space and
$f:X\to \mathbb{R}\cup \{+\infty \}$ is a function such that $f-x^\ast$ attains
its minimum for every $x^\ast \in U$, where $U$ is an open set with respect to
the Mackey topology in $X^\ast$, then for every $\gamma \in \mathbb{R}$ and
$x^\ast \in U$ the set $\{ x\in X : f(x)- \langle x^\ast , x \rangle \leq
\gamma \}$ is relatively weakly compact. This result corresponds to an
extension of Theorem 2.4 in [J. Saint Raymond, Mediterr. J. Math. 10 (2013),
no. 2, 927--940].
  Directional James compactness theorems are also derived.
