[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] [elpa] externals/auctex b641204 1/8: Improve handling for
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] [elpa] externals/auctex b641204 1/8: Improve handling for parentheses with electric-pair-mode (bug#47936) |
Date: |
Sun, 25 Apr 2021 15:22:50 -0400 (EDT) |
branch: externals/auctex
commit b64120410f1a7a7c6231cbb50c54b22d00569288
Author: Philip K <philipk@posteo.net>
Commit: Tassilo Horn <tsdh@gnu.org>
Improve handling for parentheses with electric-pair-mode (bug#47936)
* latex.el (LaTeX-insert-corresponding-right-macro-and-brace): Improve
handling for parentheses with electric-pair-mode (bug#47936).
---
latex.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/latex.el b/latex.el
index 83d50ca..c6e0a62 100644
--- a/latex.el
+++ b/latex.el
@@ -2954,7 +2954,7 @@ Normally bound to keys \(, { and [."
(funcall f))))))
(defun LaTeX-insert-corresponding-right-macro-and-brace
- (lmacro lbrace &optional optional prompt)
+ (lmacro lbrace &optional optional prompt)
"Insert right macro and brace correspoinding to LMACRO and LBRACE.
Left-right association is determined through
`LaTeX-left-right-macros-association' and `TeX-braces-association'.
@@ -2979,6 +2979,10 @@ is nil, consult user which brace should be used."
(if rmacro
(insert TeX-esc rmacro))
(cond
+ ((and electric-pair-mode
+ (string= (char-to-string last-command-event) lbrace))
+ ;; Do nothing as `electric-pair-mode' closes for us.
+ nil)
((and TeX-arg-right-insert-p rbrace)
(insert rbrace))
(rmacro
@@ -2987,7 +2991,7 @@ is nil, consult user which brace should be used."
optional prompt
(format "Which brace (default %s)"
(or rbrace "."))) TeX-left-right-braces
- nil nil nil nil (or rbrace ".")))))))
+ nil nil nil nil (or rbrace ".")))))))
(defun LaTeX--find-preceding-left-macro-name ()
"Return the left macro name just before the point, if any.
- [AUCTeX-diffs] [elpa] externals/auctex updated (0383415 -> 3c4c78b), Tassilo Horn, 2021/04/25
- [AUCTeX-diffs] [elpa] externals/auctex b641204 1/8: Improve handling for parentheses with electric-pair-mode (bug#47936),
Tassilo Horn <=
- [AUCTeX-diffs] [elpa] externals/auctex 98455d0 6/8: Give explicit arg to LaTeX-back-to-indentation in filling functions., Tassilo Horn, 2021/04/25
- [AUCTeX-diffs] [elpa] externals/auctex 40b9319 7/8: Fix matching of script chars (bug#48012), Tassilo Horn, 2021/04/25
- [AUCTeX-diffs] [elpa] externals/auctex 93363d3 3/8: Follow up previous commit, Tassilo Horn, 2021/04/25
- [AUCTeX-diffs] [elpa] externals/auctex d1d99ae 2/8: Get rid of unexpected side effects, Tassilo Horn, 2021/04/25
- [AUCTeX-diffs] [elpa] externals/auctex 3d813cd 4/8: Add new test, Tassilo Horn, 2021/04/25
- [AUCTeX-diffs] [elpa] externals/auctex 6d3ecf3 5/8: Don't treat comments with whitespace before % as code comments, Tassilo Horn, 2021/04/25
- [AUCTeX-diffs] [elpa] externals/auctex 3c4c78b 8/8: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2021/04/25