monnier pushed a commit to branch externals/auctex
in repository elpa.
commit 3cba1615e9d746e9e6cb26086d176c4460921b50
Author: Tassilo Horn <[email protected]>
Date: Fri Nov 29 07:48:26 2013 +0100
Disable electric-pair-mode.
* tex.el (VirTeX-common-initialization): Disable
`electric-pair-mode' (a global minor mode) in auctex buffers
because it interferes with auctex's pairing feature.
---
ChangeLog | 6 ++++++
tex.el | 8 +++++++-
2 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2838966..80f89d7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-11-29 Tassilo Horn <[email protected]>
+
+ * tex.el (VirTeX-common-initialization): Disable
+ `electric-pair-mode' (a global minor mode) in auctex buffers
+ because it interferes with auctex's pairing feature.
+
2013-11-23 Mos� Giordano <[email protected]>
* latex.el (LaTeX-common-initialization):
diff --git a/tex.el b/tex.el
index 07c452e..ea882f6 100644
--- a/tex.el
+++ b/tex.el
@@ -3169,7 +3169,13 @@ The algorithm is as follows:
(when (or (not (file-exists-p (buffer-file-name)))
(eq TeX-master 'shared))
(TeX-master-file nil nil t))
- (TeX-update-style t)) nil t))
+ (TeX-update-style t)) nil t)
+ ;; AUCTeX brace pairing feature doesn't play nice with `electric-pair-mode'
+ ;; which is a global minor mode as of emacs 24.4.
+ (when (and (boundp 'electric-pair-mode)
+ (boundp 'electric-pair-inhibit-predicate))
+ (set (make-local-variable 'electric-pair-inhibit-predicate)
+ (lambda (char) t))))
;;; Hilighting