auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] [elpa] externals/auctex d1d99ae 2/8: Get rid of unexpecte


From: Tassilo Horn
Subject: [AUCTeX-diffs] [elpa] externals/auctex d1d99ae 2/8: Get rid of unexpected side effects
Date: Sun, 25 Apr 2021 15:22:50 -0400 (EDT)

branch: externals/auctex
commit d1d99ae8bbdfd55893ffa851b931b7b617612301
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>

    Get rid of unexpected side effects
    
    * latex.el (LaTeX-insert-left-brace): Use `insert' instead of
    `self-insert-command' to avoid all unexpected interactions.
    (LaTeX-insert-corresponding-right-macro-and-brace)
    (LaTeX-common-initialization):
    Remove codes which is no longer necessary.
---
 latex.el | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/latex.el b/latex.el
index c6e0a62..c8370c5 100644
--- a/latex.el
+++ b/latex.el
@@ -2899,7 +2899,7 @@ Normally bound to keys \(, { and [."
              (TeX-active-mark)
              (> (point) (mark)))
         (exchange-point-and-mark))
-    (self-insert-command (prefix-numeric-value arg))
+    (insert (make-string (prefix-numeric-value arg) last-command-event))
     (if auto-p
         (let ((lbrace (char-to-string last-command-event)) lmacro skip-p)
           (save-excursion
@@ -2979,10 +2979,6 @@ 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
@@ -6814,13 +6810,6 @@ function would return non-nil and `(match-string 1)' 
would return
 
   (define-key LaTeX-mode-map "\C-xne" #'LaTeX-narrow-to-environment)
 
-  ;; AUCTeX's brace pairing feature (`LaTeX-electric-left-right-brace') doesn't
-  ;; play nice with `electric-pair-mode' which is a global minor mode as of
-  ;; emacs 24.4.
-  (when (and LaTeX-electric-left-right-brace
-             (boundp 'electric-pair-mode))
-    (set (make-local-variable 'electric-pair-mode) nil))
-
   ;; Initialization of `add-log-current-defun-function':
   (set (make-local-variable 'add-log-current-defun-function)
        #'TeX-current-defun-name))




reply via email to

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