Emacs 31 changed behavior of replace-regexp-in-string with lambda replacements
containing backslashes: 'Invalid use of backslash in replacement text' error.
Fix: use with-temp-buffer + re-search-forward + replace-match (literal t t).
replace-match with LITERAL=t never processes backslash sequences.
Also fixes \end{tabular} → \end{tabularx} regex to not match existing tabularx.
42 KiB
42 KiB