auctex-diffs
[Top][All Lists]
Advanced

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

master 04814a0e: Track the latest version of usrguide.tex


From: Arash Esbati
Subject: master 04814a0e: Track the latest version of usrguide.tex
Date: Thu, 29 Feb 2024 16:20:11 -0500 (EST)

branch: master
commit 04814a0ea5c5623d16245d7fd109cd5b9b5972a8
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>

    Track the latest version of usrguide.tex
    
    * font-latex.el (font-latex-built-in-keyword-classes): Add
    fontification support for new macros.
    
    * latex.el (LaTeX-common-initialization): Support new macros.
    Rearrange acc. to usrguide.tex.
    
    * style/xparse.el ("xparse"): Move deprecated macros from latex.el
    to xparse.el.
---
 font-latex.el   | 11 ++++++++-
 latex.el        | 70 +++++++++++++++++++++++++++++++++++++--------------------
 style/xparse.el | 17 ++++++++++++--
 3 files changed, 71 insertions(+), 27 deletions(-)

diff --git a/font-latex.el b/font-latex.el
index ab33b4db..ccddd8b1 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -373,7 +373,16 @@ variable `font-latex-fontify-sectioning'." ',num)
       ("DeclareDocumentEnvironment" "{{{{")
       ("NewDocumentEnvironment"     "{{{{")
       ("ProvideDocumentEnvironment" "{{{{")
-      ("RenewDocumentEnvironment"   "{{{{"))
+      ("RenewDocumentEnvironment"   "{{{{")
+      ("NewCommandCopy"     "|{\\|{\\")
+      ("RenewCommandCopy"   "|{\\|{\\")
+      ("DeclareCommandCopy" "|{\\|{\\")
+      ("ShowCommand"        "|{\\")
+      ("NewEnvironmentCopy"     "{{")
+      ("RenewEnvironmentCopy"   "{{")
+      ("DeclareEnvironmentCopy" "{{")
+      ("ShowEnvironment"        "{")
+      ("listfiles" "["))
      font-lock-function-name-face 2 command)
     ("function-noarg"
      ("enspace" "enskip" "quad" "qquad" "nonumber"
diff --git a/latex.el b/latex.el
index c57192d1..3e3452a4 100644
--- a/latex.el
+++ b/latex.el
@@ -8761,9 +8761,6 @@ function would return non-nil and `(match-string 1)' 
would return
      '("textsubscript" "Text")
      '("textcircled" "Text")
      '("mathring" t)
-     '("MakeUppercase" t)
-     '("MakeLowercase" t)
-     '("MakeTitlecase" t)
      '("chaptermark" "Text")
      '("sectionmark" "Text")
      '("subsectionmark" "Text")
@@ -8772,7 +8769,7 @@ function would return non-nil and `(match-string 1)' 
would return
      '("subparagraphmark" "Text")
 
      "LaTeXe"
-     "listfiles" "frontmatter" "mainmatter" "backmatter"
+     "frontmatter" "mainmatter" "backmatter"
      "leftmark" "rightmark"
      "textcompwordmark" "textvisiblespace" "textemdash" "textendash"
      "textexclamdown" "textquestiondown" "textquotedblleft"
@@ -8944,25 +8941,25 @@ function would return non-nil and `(match-string 1)' 
would return
      '("mathversion" (TeX-arg-completing-read ("normal" "bold") "Version"))
 
      ;; Macros for document-command parser, aka xparse added to LaTeX
-     ;; kernel with 2020-10-01 release:
-     '("DeclareDocumentCommand"
-       TeX-arg-define-macro "Argument specification" t)
+     ;; kernel with 2020-10-01 release and documented in usrguide.pdf
      '("NewDocumentCommand"
        TeX-arg-define-macro "Argument specification" t)
      '("RenewDocumentCommand"
        TeX-arg-macro "Argument specification" t)
      '("ProvideDocumentCommand"
        TeX-arg-define-macro "Argument specification" t)
+     '("DeclareDocumentCommand"
+       TeX-arg-define-macro "Argument specification" t)
 
      ;; Declaring environments
-     '("DeclareDocumentEnvironment" TeX-arg-define-environment
-       "Argument specification" t t)
      '("NewDocumentEnvironment" TeX-arg-define-environment
        "Argument specification" t t)
      '("RenewDocumentEnvironment" TeX-arg-environment
        "Argument specification" t t)
      '("ProvideDocumentEnvironment" TeX-arg-define-environment
        "Argument specification" t t)
+     '("DeclareDocumentEnvironment" TeX-arg-define-environment
+       "Argument specification" t t)
 
      ;; Fully-expandable document commands
      '("DeclareExpandableDocumentCommand"
@@ -8975,9 +8972,6 @@ function would return non-nil and `(match-string 1)' 
would return
        TeX-arg-define-macro "Argument specification" t)
 
      ;; Testing special values
-     '("IfBooleanTF" 3)
-     '("IfBooleanT" 2)
-     '("IfBooleanF" 2)
      '("IfNoValueTF" 3)
      '("IfNoValueT" 2)
      '("IfNoValueF" 2)
@@ -8989,18 +8983,49 @@ function would return non-nil and `(match-string 1)' 
would return
      '("IfBlankF" 2)
      "BooleanTrue"
      "BooleanFalse"
+     '("IfBooleanTF" 3)
+     '("IfBooleanT" 2)
+     '("IfBooleanF" 2)
+
      ;; Argument processors
-     "ProcessedArgument"
-     "ReverseBoolean"
      '("SplitArgument" "Number" "Token")
      '("SplitList" "Token")
-     "TrimSpaces"
      '("ProcessList" "List" "Function")
-     ;; Access to the argument specification
-     '("GetDocumentCommandArgSpec" TeX-arg-macro)
-     '("GetDocumentEnvironmmentArgSpec" TeX-arg-environment)
-     '("ShowDocumentCommandArgSpec" TeX-arg-macro)
-     '("ShowDocumentEnvironmentArgSpec" TeX-arg-environment)
+     "ReverseBoolean"
+     "TrimSpaces"
+     "ProcessedArgument"
+
+     ;; Copying and showing (robust) commands and environments
+     '("NewCommandCopy" TeX-arg-define-macro TeX-arg-macro)
+     '("RenewCommandCopy" TeX-arg-define-macro TeX-arg-macro)
+     '("DeclareCommandCopy" TeX-arg-define-macro TeX-arg-macro)
+     '("ShowCommand"        TeX-arg-macro)
+
+     '("NewEnvironmentCopy" TeX-arg-define-environment TeX-arg-environment)
+     '("RenewEnvironmentCopy" TeX-arg-define-environment TeX-arg-environment)
+     '("DeclareEnvironmentCopy" TeX-arg-define-environment TeX-arg-environment)
+     '("ShowEnvironment" TeX-arg-environment)
+
+     ;; Preconstructing command names (or otherwise expanding arguments)
+     '("UseName" "String")
+     ;; Only offer the predictable part
+     '("ExpandArgs"
+       (TeX-arg-completing-read ("c" "cc" "Nc") "Spec"))
+
+     ;; Expandable floating point (and other) calculations
+     '("fpeval" t)
+     '("inteval" t)
+     '("dimeval" t)
+     '("skipeval" t)
+
+     ;; Case changing
+     '("MakeUppercase" t)
+     '("MakeLowercase" t)
+     '("MakeTitlecase" t)
+
+     ;; Support for problem solving
+     '("listfiles"
+       [TeX-arg-completing-read-multiple ("hashes" "sizes")])
 
      ;; LaTeX hook macros:
      '("AddToHook"      TeX-arg-hook [ "Label" ] t)
@@ -9069,10 +9094,7 @@ function would return non-nil and `(match-string 1)' 
would return
                                 "Position 1")
        (TeX-arg-completing-read ("top" "first" "last")
                                 "Position 2")
-       2)
-     '("fpeval" t)
-     '("dimeval" t)
-     '("skipeval" t) ))
+       2) ))
 
   (TeX-run-style-hooks "LATEX")
 
diff --git a/style/xparse.el b/style/xparse.el
index ed136702..a39e9f96 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--2023 Free Software Foundation, Inc.
+;; Copyright (C) 2013--2024 Free Software Foundation, Inc.
 
 ;; Maintainer: auctex-devel@gnu.org
 ;; Author: Mosè Giordano <mose@gnu.org>
@@ -27,15 +27,28 @@
 
 ;; The content of this file is now (December 2023) part of latex.el
 ;; and font-latex.el.  This style provides only completion for xparse
-;; package options.
+;; package options and some macros re-allocated from the kernel back
+;; into xparse.sty with LaTeX release 2023-11-01.
 
 ;; The "yet not more supported" specifiers `l', `u', `g' and `G' are
 ;; ignored completely and may lead to wrong parsing results.
 
 ;;; Code:
 
+(require 'tex)
 (require 'latex)
 
+(TeX-add-style-hook
+ "xparse"
+ (lambda ()
+   (TeX-add-symbols
+    ;; Access to the argument specification
+    '("GetDocumentCommandArgSpec" TeX-arg-macro)
+    '("GetDocumentEnvironmmentArgSpec" TeX-arg-environment)
+    '("ShowDocumentCommandArgSpec" TeX-arg-macro)
+    '("ShowDocumentEnvironmentArgSpec" TeX-arg-environment)))
+ TeX-dialect)
+
 (defvar LaTeX-xparse-package-options-list
   '(("log-declarations" ("true" "false")))
   "Package options for the xparse package.")



reply via email to

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