A solution to an exercise in Principles of Quantum Mechanics:
My question concerns the leap
This is apparently an application of Integration by Parts; however, it seems to me it is conflating $$ \int g(x)\,\mathrm{d}\theta(x-x') $$
with
$$ \int g(x) \theta'(x-x')\,\mathrm{d}x $$
which is the form required for us to able to apply Integration by Parts. Is this not the case?


Riemann-Stieltjes integral
Definition. The Riemann–Stieltjes integral of a real-valued function $f$ of a real variable on the interval $[a,b]$ with respect to another real-to-real function $\alpha$ is denoted by $$\int_a^b f(x) \, \mathrm{d}\alpha(x).$$ The definition of the Riemann–Stieltjes integral can be found here.
Lemma 1. Given an $\alpha(x)$ which is continuously differentiable over $\mathbb{R}$. Then $$\int_a^b f(x) \, \mathrm{d}\alpha(x) = \int_a^b f(x)\alpha'(x) \, \mathrm{d}x.$$
Lemma 2. Let $f$ be a Riemann-Stieltjes integrable function with respect to $\alpha$ on the interval $[a,b]$. Then $\alpha$ be a Riemann-Stieltjes integrable function with respect to $f$ on the interval $[a,b]$ and $$\int_a^b f(x) \, \mathrm{d}\alpha(x)=\left[\alpha(x)f(x)\right]_{a}^{b}-\int_a^b \alpha(x) \, \mathrm{d}f(x).$$
A proof of this theorem can be found here.
Analyzing the leap
Choose $f(x) =g(x)$ and $\alpha(x)=\Theta(x-x')$. By Lemma 2,
$$\begin{align}\int_{-\infty}^{\infty} g(x) \, \mathrm{d}\Theta(x-x') &= \left[\Theta(x-x')g(x)\right]_{-\infty}^{+\infty}-\int_{-\infty}^\infty \Theta(x-x') \, \mathrm{d}g(x). \end{align}$$
If we let $g(x)$ be continuously differentiable over $\mathbb{R}$, by Lemma 1 we get $$\begin{align}\int_{-\infty}^\infty g(x) \, \mathrm{d}\Theta(x-x') &= \left[\Theta(x-x')g(x)\right]_{-\infty}^{+\infty}-\int_{-\infty}^{\infty} \Theta(x-x')g'(x) \, \mathrm{d}x. \end{align}$$