branch: main
commit d962325648fee98d0fab6888e5c01d1761fc4784
Author: Arash Esbati <[email protected]>
Commit: Arash Esbati <[email protected]>
Fix parsing in style/minted2?.el
* style/minted.el (LaTeX-minted-auto-cleanup):
* style/minted2.el (LaTeX-minted2-auto-cleanup): Take parsed
elements from `LaTeX-auto-minted2?-newmint' since the functions
`LaTeX-minted2?-newmint-list' strip parsed entries if the optional
argument of \newmint macros is missing.
---
style/minted.el | 6 +++---
style/minted2.el | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/style/minted.el b/style/minted.el
index 655e9a4f..4343cef4 100644
--- a/style/minted.el
+++ b/style/minted.el
@@ -1,6 +1,6 @@
;;; minted.el --- AUCTeX style for `minted.sty' (v3.2.0) -*- lexical-binding:
t; -*-
-;; Copyright (C) 2014--2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014--2025 Free Software Foundation, Inc.
;; Author: Tassilo Horn <[email protected]>
;; Maintainer: [email protected]
@@ -264,7 +264,7 @@ Update the variable `LaTeX-minted-style-list' if still nil."
(defun LaTeX-minted-auto-cleanup ()
"Process the parsed results from minted package."
- (dolist (mint (LaTeX-minted-newmint-list))
+ (dolist (mint LaTeX-auto-minted-newmint)
(cond ((string= (nth 2 mint) "ed")
;; \newminted{lang}{opts} => new langcode env.
;; \newminted[envname]{lang}{opts} => new envname env.
@@ -321,7 +321,7 @@ Update the variable `LaTeX-minted-style-list' if still nil."
(font-latex-add-keywords `((,lang "[")) 'textual))))))
;; Refresh font-locking so that the verbatim envs take effect only
;; when there are defined shortcuts:
- (when (and (LaTeX-minted-newmint-list)
+ (when (and LaTeX-auto-minted-newmint
(fboundp 'font-latex-set-syntactic-keywords)
(eq TeX-install-font-lock 'font-latex-setup))
(font-latex-set-syntactic-keywords)))
diff --git a/style/minted2.el b/style/minted2.el
index 687b195c..ec6942fe 100644
--- a/style/minted2.el
+++ b/style/minted2.el
@@ -1,6 +1,6 @@
;;; minted2.el --- AUCTeX style for `minted2.sty' (v2.9) -*- lexical-binding:
t; -*-
-;; Copyright (C) 2014--2024 Free Software Foundation, Inc.
+;; Copyright (C) 2014--2025 Free Software Foundation, Inc.
;; Author: Tassilo Horn <[email protected]>
;; Maintainer: [email protected]
@@ -241,7 +241,7 @@ Update the variable `LaTeX-minted2-style-list' if still
nil."
(defun LaTeX-minted2-auto-cleanup ()
"Process the parsed results from minted2 package."
- (dolist (mint (LaTeX-minted2-newmint-list))
+ (dolist (mint LaTeX-auto-minted2-newmint)
(cond ((string= (nth 2 mint) "ed")
;; \newminted{lang}{opts} => new langcode and langcode* envs.
;; \newminted[envname]{lang}{opts} => new envname/envname* envs.
@@ -302,7 +302,7 @@ Update the variable `LaTeX-minted2-style-list' if still
nil."
(font-latex-add-keywords `((,lang "[")) 'textual))))))
;; Refresh font-locking so that the verbatim envs take effect only
;; when there are defined shortcuts:
- (when (and (LaTeX-minted2-newmint-list)
+ (when (and LaTeX-auto-minted2-newmint
(fboundp 'font-latex-set-syntactic-keywords)
(eq TeX-install-font-lock 'font-latex-setup))
(font-latex-set-syntactic-keywords)))