This problem is from Rudin. I am trying to Prove that the closure of a connected set is always connected. Here is my proof.
Let $E$ be a connected set in a space $X$. Suppose to the contrary that the closure of $E$, $\overline{E}$ is not connected. Then there exist two sets $A$ and $B$ such that $\overline{E}=A \cup B$ and $\overline{A}\cap B= \emptyset=A\cap\overline{B}$. $E$ being connected, we know that $A\cup B \neq E$ so there exist $p \in \overline{E} \backslash E$. We also know that $\overline{E}=E\cup E'$ (where $E'$ is the set of the limit points of $E$) so $p$ must be a limit point of $E$ (but not in $E$). Taking the set of all such $p$ we obtain the set $E''=\{p|p\in E', p\not \in E\}$. We find then that $E'' \subset A$ or $E'' \subset B$. Say $E'' \subset A$. Then $E \subset B$ and we see that $A\cap\overline{B}\neq \emptyset$ which is a contradiction. So $\overline{E}$ must be connected.
Can anyone help me critique this proof? I feel uneasy about it but I don't know exactly what is wrong with it.
Thank-you