Prove that if $f:\mathbb R\to\mathbb R$ is continuous at $a$ and differentiable at all $x\neq a$ in a neighborhood of $a$, and $\lim_{x\to a}f'(x)=L$, then $f$ is differentiable at $a$ and $f'(a)=L$.
It seems so obvious, yet I can't find the way to formulate a solution. Would appreciate any help.