[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex d6fb3c58ce 01/39: Be more resilient when parsing
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex d6fb3c58ce 01/39: Be more resilient when parsing arguments |
Date: |
Thu, 20 Jul 2023 04:21:48 -0400 (EDT) |
branch: externals/auctex
commit d6fb3c58ce624a89b3e7f5dbf6e2764f950c7fc7
Author: Arash Esbati <arash.esbati@gmail.com>
Commit: Arash Esbati <arash.esbati@gmail.com>
Be more resilient when parsing arguments
* style/xparse.el (LaTeX-xparse-macro-parse): Locally bind
`case-fold-search' to nil and be case-sensitive when parsing the
argument.
Accept only braces as delimiters when moving over balanced
expressions. (bug#62997)
---
style/xparse.el | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/style/xparse.el b/style/xparse.el
index 397a0c4bae..9961cc6ad6 100644
--- a/style/xparse.el
+++ b/style/xparse.el
@@ -1,6 +1,6 @@
;;; xparse.el --- AUCTeX style for `xparse.sty' version 2022-07-05 -*-
lexical-binding: t; -*-
-;; Copyright (C) 2013, 2020--2022 Free Software Foundation, Inc.
+;; Copyright (C) 2013, 2020--2023 Free Software Foundation, Inc.
;; Maintainer: auctex-devel@gnu.org
;; Author: Mosè Giordano <mose@gnu.org>
@@ -111,6 +111,8 @@ TYPE is one of the symbols mac or env."
(let ((name (nth 1 xcmd))
(spec (nth 2 xcmd))
(what (nth 3 xcmd))
+ (case-fold-search nil)
+ (syntax (TeX-search-syntax-table ?\{ ?\}))
args opt-star opt-token)
(with-temp-buffer
(set-syntax-table LaTeX-mode-syntax-table)
@@ -128,7 +130,7 @@ TYPE is one of the symbols mac or env."
;; over [>=] and a balanced {}
((looking-at-p "[>=]")
(forward-char 1)
- (forward-sexp))
+ (with-syntax-table syntax (forward-sexp)))
;; Mandatory arguments:
;; m: Ask for input with "Text" as prompt
((looking-at-p "m")
@@ -144,7 +146,7 @@ TYPE is one of the symbols mac or env."
;; R<token1><token2>{default}
((looking-at-p "R")
(re-search-forward "R\\(.\\)\\(.\\)" (+ (point) 3) t)
- (forward-sexp)
+ (with-syntax-table syntax (forward-sexp))
(push `(LaTeX-arg-xparse-query
,(match-string-no-properties 1)
,(match-string-no-properties 2))
@@ -168,12 +170,12 @@ TYPE is one of the symbols mac or env."
;; O{default}
((looking-at-p "O")
(forward-char 1)
- (forward-sexp)
+ (with-syntax-table syntax (forward-sexp))
(push (vector "Text") args))
;; D<token1><token2>{default}
((looking-at-p "D")
(re-search-forward "D\\(.\\)\\(.\\)" (+ (point) 3) t)
- (forward-sexp)
+ (with-syntax-table syntax (forward-sexp))
(push (vector #'LaTeX-arg-xparse-query
(match-string-no-properties 1)
(match-string-no-properties 2))
@@ -205,7 +207,7 @@ TYPE is one of the symbols mac or env."
,(match-string-no-properties 1))
args)
(when (looking-at-p TeX-grop)
- (forward-sexp)))
+ (with-syntax-table syntax (forward-sexp))))
;; Finished:
(t nil))))
(if (eq type 'env)
- [elpa] externals/auctex updated (9d47b0a1bd -> 1c3360b162), Tassilo Horn, 2023/07/20
- [elpa] externals/auctex 11e9dbfdf3 30/39: Track last change for \newtheorem macro in styles, Tassilo Horn, 2023/07/20
- [elpa] externals/auctex d6fb3c58ce 01/39: Be more resilient when parsing arguments,
Tassilo Horn <=
- [elpa] externals/auctex 22ba857c53 06/39: Improve fontification within shortvrb delimiters, Tassilo Horn, 2023/07/20
- [elpa] externals/auctex 4bcad4772d 15/39: Simplify handling of package options, Tassilo Horn, 2023/07/20
- [elpa] externals/auctex b4c27dd36b 02/39: Lift required GNU Emacs version to 26.1, Tassilo Horn, 2023/07/20
- [elpa] externals/auctex e0bc78a500 23/39: Support in-buffer completion for class/package names/options, Tassilo Horn, 2023/07/20
- [elpa] externals/auctex b55368f75f 38/39: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2023/07/20
- [elpa] externals/auctex 2017d97b0e 09/39: Rewrite *-unload-hook to *-unload-function, Tassilo Horn, 2023/07/20
- [elpa] externals/auctex c67f5d75b2 14/39: ; * Makefile.in (STYLESRC): Fix last change., Tassilo Horn, 2023/07/20
- [elpa] externals/auctex 1c3360b162 39/39: Release GNU AUCTeX 13.2.1, Tassilo Horn, 2023/07/20
- [elpa] externals/auctex cdd0cbf33a 03/39: Add new style/soul.el, Tassilo Horn, 2023/07/20
- [elpa] externals/auctex 6d34e1f1ae 34/39: Simplify implementation of style/paralist.el, Tassilo Horn, 2023/07/20