Subject: 31.0.50; New tex-mode prettify-symbols-mode rule causes visual regression

From: Tony Zorman <[email-masked]>
Date: Tue, 10 Jun 2025 18:39:37 +0200

Hi,

ever since ef6203b64aaf (Extend prettify-symbols-alist in TeX mode)
'tex--prettify-symbols-alist' contains the line

    ("\\ " . 9141) ; Literal ?⎵ breaks indentation

However, this is problematic and results in false positives for this
glyph, since it clashes with two literal backslashes -- which may be
used for line breaks -- followed by a space. For example,

    \begin{align*}
      f\colon A &\to B\\ a &\mapsto f(a) 
    \end{align*}

would display as

    \begin{align*}
      f: A &→ B\⎵a &↦ f(a) 
    \end{align*}

While I agree that a double backslash not followed by a newline is
confusing, some of my coauthors don't. This also affects other
environments that some people like to compress, like the ones for
matrices or TikZ pictures. I don't think getting this right is possible
without using regular expressions (which is AFAIU not how
'prettify-symbols-mode' works).

  Tony

-- 
Tony Zorman | https://tony-zorman.com