"Paul D. Nelson" <[email protected]> writes:

> branch: main
> commit b61f64b32bb66f5fc0d7ca2328e9249aaab7b180
> Author: Paul Nelson <[email protected]>
> Commit: Paul Nelson <[email protected]>
>
>     ; LaTeX-modify-math: Improve punctuation handling
>     
>     * latex.el (LaTeX--modify-math-1): When converting to inline
>     with sentence-end-double-space non-nil, insert an extra space
>     after punctuation marks (.!?).
> ---
>  latex.el | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/latex.el b/latex.el
> index a8ed0127..7726019c 100644
> --- a/latex.el
> +++ b/latex.el
> @@ -9648,6 +9648,11 @@ marker that keeps track of cursor position."
>          (insert new-close)
>          ;; Indent, including one line past the modified region.
>          (widen)
> +        (when sentence-end-double-space
> +          (when (looking-at-p "[.?!]")
> +            (save-excursion
> +              (forward-char)
> +              (insert " "))))

(and sentence-end-double-space
     (looking-at-p "[.?!]")
     (save-excursion
       (forward-char)
       (insert " ")))

?  Best, Arash

Reply via email to