Subject: bug#52872: closed (Re: bug#52872: 13.0.15; wrong type argument error on calling ‘LaTeX-xparse-macro-parse’)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 30 Dec 2021 20:31:03 +0000

Your bug report

#52872: 13.0.15; wrong type argument error on calling ‘LaTeX-xparse-macro-parse’

which was filed against the auctex package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
52872: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=52872
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#52872: 13.0.15; wrong type argument error on calling‘LaTeX-xparse-macro-parse’
From: Tassilo Horn <[email-masked]>
To: Andrea Greselin <[email-masked]>
Cc: [email-masked], Arash Esbati <[email-masked]>, [email-masked]
Date: Thu, 30 Dec 2021 21:28:41 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Andrea Greselin <[email-masked]> writes:

Hi Andrea,

> Sorry for wasting your time guys :(

No problem at all.  I'm closing this bug.

> Have a happy new year :-)

Same to you!

Bye,
Tassilo

Subject: 13.0.15; wrong type argument error on calling ‘LaTeX-xparse-macro-parse’
From: Andrea Greselin <[email-masked]>
To: [email-masked]
Date: Wed, 29 Dec 2021 16:20:33 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,
after updating to AUCTeX 13.0.15 I started getting a wrong type
argument error on opening certain .tex files. The traceback showed
that the culprit was ‘LaTeX-xparse-macro-parse’ calling
‘replace-regexp-in-string’ with a nil ‘spec’ argument. If I understand
correctly, the function is reading the ‘name’, ‘spec’ and ‘what’ local
variables from the ‘xcmd’ list with an offset wrt to v. 13.0.14. The
attached patch removes the offset and it’s fixed the issue for me.
diff --git a/auctex-13.0.15/style/xparse.el b/auctex-13.0.15/style/xparse.el
index fd9bb32..26934f1 100644
--- a/auctex-13.0.15/style/xparse.el
+++ b/auctex-13.0.15/style/xparse.el
@@ -108,9 +108,9 @@ TYPE is one of the symbols mac or env."
   (dolist (xcmd (if (eq type 'mac)
                     (LaTeX-xparse-macro-list)
                   (LaTeX-xparse-environment-list)))
-    (let ((name (nth 1 xcmd))
-          (spec (nth 2 xcmd))
-          (what (nth 3 xcmd))
+    (let ((name (nth 0 xcmd))
+          (spec (nth 1 xcmd))
+          (what (nth 2 xcmd))
           args opt-star opt-token)
       (with-temp-buffer
         (set-syntax-table LaTeX-mode-syntax-table)