auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] Enhancement for brace pairing


From: Mosè Giordano
Subject: Re: [AUCTeX-devel] Enhancement for brace pairing
Date: Sat, 28 Sep 2013 00:06:28 +0200

Hi Ikumi and Tassilo,

I cannot understand why in `TeX-arg-insert-braces' we need to insert a
newline and then to delete it.  Has someone a clue about the
rationale?  The following patch avoids all this (if it's really
unnecessary):

--8<---------------cut here---------------start------------->8---
diff --git a/latex.el b/latex.el
index f59168f..873c57e 100644
--- a/latex.el
+++ b/latex.el
@@ -2204,14 +2204,7 @@ string."
       (setq left-macro (buffer-substring-no-properties
                         (point)
                         (progn (backward-word 1) (point))))
-      (backward-char)
-      (LaTeX-newline)
-      (indent-according-to-mode)
-      ;; Delete possibly produced blank line.
-      (beginning-of-line 0)
-      (if (looking-at "^[ \t]*$")
-          (progn (delete-horizontal-space)
-                 (delete-char 1))))
+      (indent-according-to-mode))
     (let ((left-brace (completing-read
                        (TeX-argument-prompt optional prompt
                         "Which brace")
--8<---------------cut here---------------end--------------->8---

Bye,
Mosè



reply via email to

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