escaped $ in math mode
Expected behavior
When in a math environment typing \$ should insert \$.
Actual behavior
- When in a math environment of the form $ ... $
typing
\$only\is inserted. The symbol $ is omitted. - When in a math environment of the form \( ... \)
typing
\$inserts\$$. A redundant $ is inserted.
Steps to reproduce the problem
Enter in latex-mode create the math environments en type \$
Backtraces if necessary (M-x toggle-debug-on-error)
Environment & version information
In recent enough smartparens you can call M-x sp-describe-system to generate this report. Please fill manually what we could not detect automatically. Edit the output as you see fit to protect your privacy.
-
smartparensversion: 20201217.1033 - Active
major-mode:latex-mode - Smartparens strict mode: nil
- Emacs version (
M-x emacs-version): GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2020-09-19 - Starterkit/Distribution: Spacemacs
- OS: gnu/linux
For me in both cases \$$ is inserted.
I tried to modify
(sp-local-pair "$" "$")
into
(sp-local-pair "$" "$"
:unless '(sp-latex-point-after-backslash ))
but it does not work... I do not see how to modify the code to obtain the right behaviour.
Yea it's probably a regression caused by some changes in latex-mode.
I guess so.
Do you have any idea on how to observe what happens en inputing '$' after '\'?