4. If the functions $f(x)$ and $g(x)$ are defined on $\mathbf{R}$, and
$$
\begin{array}{l}
f(x-y)=f(x) g(y)-g(x) f(y), f(-2) \\
=f(1) \neq 0, \text { then } g(1)+g(-1)=\ldots
\end{array}
$$
(Answer with a number).
4. -1 .
$$
\begin{array}{l}
\because f(x-y)=f(x) g(y)-g(x) f(y), \\
\therefore f(y-x)=f(y) g(x)-g(y) f(x) \\
\quad=-[f(x) g(y)-g(x) f(y)]
\end{array}
$$

There is $f(x-y)=-f(y-x)$
$$
=-f[-(x-y)] \text {. }
$$

Then $f(-x)=-f(x)$, i.e., $f(x)$ is an odd function.
$$
\text { Hence } \begin{aligned}
f(1) & =f(-2)=f(-1-1) \\
& =f(-1) g(1)-g(-1) f(1) \\
& =-f(1)[g(1)+g(-1)] . \\
\therefore g(1) & +g(-1)=-1 .
\end{aligned}
$$