Usually a proof of the Residue Theorem on a Compact Riemann Surface uses the crucial fact that Holomorphic forms are closed. I tried to write a proof and somehow I didn't use that fact anywhere. Can someone please check if my proof is ok? Also, if it is correct I don't exactly understand how I was able to avoid that.
The Residue Theorem: $X$ Compact Riemann Surface. $a_1,\dots, a_n $ are distnct points in $X$. Let $X'=X-\{a_1,\dots, a_n\}$. Then for every holomorphic $1$-form $\omega\in\Omega(X')$, one has $\sum_{k=1}^{n}Res_{a_k}(\omega)=0$
Proof. Choose coordinate neighborhoods $(U_k,z_k)$ of the $a_k$ such that $U_j\cap U_k\neq\emptyset$ if $j\neq k$. Also we may assume that $z_k(a_k) = 0$ and each $z_k(U_k)\subset\mathbb{C}$ is an open disk of radius $1$. For every $k = 1, ... , n$ choose a function $f_k$ with compact support Supp$(f_k)\subset U_k$ such that there exists an open neighborhood $U'_k\subset U_k$ of $a_k$ with $f_k\big| U'_k = 1$ and $U'_k$s are balls of the form $U'_k=\{x\in U_k:|z_k(x)|<\epsilon\}$ (for small enough $\epsilon>0).$
Set $g := 1 - (f_1 + ... + f_n).$ Then $g\big|U'_k= 0.$ Thus $g\omega$ may be continued to the point $a_k$ by assigning it the value zero, and may thus be considered as an element of $\mathcal{E}^1 (X)$. So by Stokes' Theorem we have $\int\int_X d(g\omega)=0$. $\exists R\in (\epsilon,1) $ such that Supp$(f_k)\subset \{|z_k|<R\}$ and $f_k\big|\{|z_k|<\epsilon\}=1$. Define $\Delta_k:=\{x\in U'_k:|z_k(x)|< R\}$ $\therefore \int\int_X d(g\omega)=\int\int_{X-\cup_{i=1}^{n}\Delta_i}d(g\omega)=0$
$\Rightarrow -\int_{\cup_{i=1}^{n}\partial\Delta_i}g\omega=0$ (Using Stokes')
$\Rightarrow \sum_{i=1}^{n}\int_{\partial\Delta_i}g\omega=0$
$\Rightarrow \sum_{i=1}^{n}\int_{\partial\Delta_i}\omega=\sum_{i=1}^{n}\int_{\partial\Delta_i}(f_1+\dots+f_n)\omega=0$ (as $f_k$ vanish outside $\Delta_k)$
$\Rightarrow \sum_{k=1}^{n}$ Res$_{a_k}(\omega)=0$