auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. b64120410f1a7a7c6231c


From: Tassilo Horn
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. b64120410f1a7a7c6231cbb50c54b22d00569288
Date: Wed, 21 Apr 2021 16:07:08 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  b64120410f1a7a7c6231cbb50c54b22d00569288 (commit)
      from  2d60aa26060692723228aef3b4089d65a3bf0960 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b64120410f1a7a7c6231cbb50c54b22d00569288
Author: Philip K <philipk@posteo.net>
Date:   Wed Apr 21 19:25:16 2021 +0200

    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).

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.

-----------------------------------------------------------------------

Summary of changes:
 latex.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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