branch: externals/auctex
commit 5b73efbfe39d2a301d7581082f0b194a26b797e6
Author: Arash Esbati <ar...@gnu.org>
Commit: Arash Esbati <ar...@gnu.org>

    ; * latex.el (LaTeX-what-macro): Assign values in one go.
---
 latex.el | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/latex.el b/latex.el
index 04caaf539a..29ac950252 100644
--- a/latex.el
+++ b/latex.el
@@ -7385,10 +7385,13 @@ this point.  If nil, limit to the previous 15 lines."
             (error nil))
           ;; Set the initial value of argument counter
           (setq cnt 1)
-          ;; Note that we count also the right opt. or man. arg:
-          (setq cnt-opt (if (= (following-char) ?\{) 0 1))
-          ;; Record if we're inside a mand. or opt. argument
-          (setq type (if (= (following-char) ?\{) 'mandatory 'optional))
+          ;; Note that we count also the right opt. or man. arg and
+          ;; record if we're inside a mand. or opt. argument
+          (if (= (following-char) ?\{)
+              (setq cnt-opt 0
+                    type 'mandatory)
+            (setq cnt-opt 1
+                  type 'optional))
           ;; Move back over any touching sexps
           (while (and (LaTeX-move-to-previous-arg bound)
                       (condition-case nil


Reply via email to