emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/auctex acacdc09a6 25/30: ; * tex.el (TeX-brace-count-li


From: Tassilo Horn
Subject: [elpa] externals/auctex acacdc09a6 25/30: ; * tex.el (TeX-brace-count-line): Fix check order.
Date: Thu, 7 Dec 2023 03:51:09 -0500 (EST)

branch: externals/auctex
commit acacdc09a6a36241e6066b84173a4bbe05bd2853
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>

    ; * tex.el (TeX-brace-count-line): Fix check order.
---
 tex.el | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/tex.el b/tex.el
index 7c3c17ea16..f9f17ba1a3 100644
--- a/tex.el
+++ b/tex.el
@@ -5495,22 +5495,24 @@ additional characters."
                  ;; what the function `TeX-verbatim-p' returns dep. on
                  ;; the position of point:
                  ;;       \Verb{\ or { or } are not special}.
-                 ;;            ^-> nil                     ^-> t
+                 ;;     nil  <-^^-> t                  t <-^^-> nil
                  (cond ((memq char (append
                                     TeX-indent-open-delimiters
                                     '(?\{)))
-                        ;; Point is one char after `{', so check if
-                        ;; we're inside a verb macro and return t,
-                        ;; otherwise increase `count':
-                        (if (TeX-verbatim-p)
+                        ;; Point is one char after `{', if char before
+                        ;; isn't inside a verb macro, then the brace
+                        ;; is a real delimiter and we increase
+                        ;; `count', otherwise not:
+                        (if (TeX-verbatim-p (1- (point)))
                             t
                           (setq count (+ count TeX-brace-indent-level))))
                        ((memq char (append
                                     TeX-indent-close-delimiters
                                     '(?\})))
-                        ;; Point if one char after `}', so check if the
-                        ;; char before point is inside a verb macro:
-                        (if (TeX-verbatim-p (1- (point)))
+                        ;; Point if one char after `}', if not inside
+                        ;; a verb macro, this is a real delimiter and
+                        ;; we decrease `count', otherwise not:
+                        (if (TeX-verbatim-p)
                             t
                           (setq count (- count TeX-brace-indent-level))))
                        ((eq char ?\\)



reply via email to

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