bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#32076: 24.5; Electric behavior of dollar sign using AUCTeX


From: Patrick Graf
Subject: bug#32076: 24.5; Electric behavior of dollar sign using AUCTeX
Date: Tue, 10 Jul 2018 07:32:34 +0200

Hi João,
sorry for not being self-contained. This was my first GNU bug report ;-)
Concerning the fix, I tried texmathp today and indeed it works fine. I have in mind something like the following snippet (to be run whenever $ is hit):

  (interactive)
  (if (texmathp)
    (if (looking-at-p "[$]")
      (forward-char 1)
      (insert "$"))
    (insert "$$")
    (backward-char 1)))

This also takes care of the issue that when I delete the closing $ by hitting backspace and then type $ again, a new pair used to be inserted.
A minor drawback is that this only works for $...$ specifically and it requires AUCTeX, which not everybody may be using. But $...$ is good enough for me and if I understand you correctly, one could include texmathp.el in the Emacs source.
Cheers,
Patrick

reply via email to

[Prev in Thread] Current Thread [Next in Thread]