branch: externals/auctex
commit dad0c605e19bff657118022e9c475fc23a4ca85b
Author: Ikumi Keita <[email protected]>
Commit: Ikumi Keita <[email protected]>
Surround both \langle and \rangle with math delimiter
* latex.el (LaTeX-math-insert): Typing "C-u ` (" used to result in
"$\langle$\rangle" when `LaTeX-math-mode' and
`LaTeX-electric-left-right-brace' are enabled. Fix this to insert
"$\langle\rangle$" instead.
---
latex.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/latex.el b/latex.el
index 4c0a75b..98621ff 100644
--- a/latex.el
+++ b/latex.el
@@ -5377,9 +5377,11 @@ commands are defined:
"Insert \\STRING{}. If DOLLAR is non-nil, put $'s around it.
If `TeX-electric-math' is non-nil wrap that symbols around the
string."
- (if dollar (insert (or (car TeX-electric-math) "$")))
- (funcall LaTeX-math-insert-function string)
- (if dollar (insert (or (cdr TeX-electric-math) "$"))))
+ (when dollar
+ (insert (or (car TeX-electric-math) "$"))
+ (save-excursion
+ (insert (or (cdr TeX-electric-math) "$"))))
+ (funcall LaTeX-math-insert-function string))
(defun LaTeX-math-cal (char dollar)
"Insert a {\\cal CHAR}. If DOLLAR is non-nil, put $'s around it.