Hi Arash, > running 'make' in the tests directory gives me currently in > latex-modify-math-test.log: > > 3 unexpected results: > FAILED LaTeX-modify-math-inline-bracket-period > FAILED LaTeX-modify-math-inline-double-dollar > FAILED LaTeX-modify-math-inline-multiple-punctuation > > Paul, can you reproduce this? Details are:
Thanks, I can reproduce. The attached patch fixes things. I'll install if there are no complaints (and will try to remember to check the tests next time!). Thanks, best, Paul
>From 262224a8f15763f6937e3e3f8f5604ee71a37ba1 Mon Sep 17 00:00:00 2001 From: Paul Nelson <[email protected]> Date: Mon, 29 Sep 2025 11:01:39 +0100 Subject: [PATCH] ; Fix recent change * latex.el (LaTeX--modify-math-1): Only insert additional space after punctuation when there is already a space present. --- latex.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/latex.el b/latex.el index d7b2ef23..386eb972 100644 --- a/latex.el +++ b/latex.el @@ -9652,7 +9652,8 @@ marker that keeps track of cursor position." (looking-at-p "[.?!]") (save-excursion (forward-char) - (insert " "))) + (when (looking-at-p " ") + (insert " ")))) (end-of-line 2) (indent-region start (point)))))) -- 2.39.5 (Apple Git-154)
