[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 12f0b610a1 06/14: * style/ltx-base.el: Update st
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 12f0b610a1 06/14: * style/ltx-base.el: Update style. |
Date: |
Sat, 16 Apr 2022 04:28:43 -0400 (EDT) |
branch: externals/auctex
commit 12f0b610a1785ee4dd8f70b109a71f7d7112567c
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
* style/ltx-base.el: Update style.
---
style/ltx-base.el | 146 ++++++++++++++++++++++++++++++++++++++++--------------
1 file changed, 109 insertions(+), 37 deletions(-)
diff --git a/style/ltx-base.el b/style/ltx-base.el
index 20b79b639d..9804c77f21 100644
--- a/style/ltx-base.el
+++ b/style/ltx-base.el
@@ -1,6 +1,6 @@
;;; ltx-base.el --- AUCTeX style for basic LaTeX commands. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2004, 2016, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2004--2022 Free Software Foundation, Inc.
;; Author: Frank Küster <frank@kuesterei.ch>
;; Maintainer: auctex-devel@gnu.org
@@ -27,62 +27,134 @@
;; This file adds general support for basic LaTeX commands used for
;; writing LaTeX class files (.cls), style files (.sty) and package
-;; files (.dtx).
+;; files (.dtx). Most of the macros are taken from clsguide.pdf.
;;; Code:
(require 'tex)
+;; Silence the compiler:
+(declare-function font-latex-add-keywords
+ "font-latex"
+ (keywords class))
+
(TeX-add-style-hook
"ltx-base"
(lambda ()
(TeX-add-symbols
- '("DeclareRobustCommand" TeX-arg-define-macro [ "Number of arguments" ] t)
- '("CheckCommand" TeX-arg-define-macro [ "Number of arguments" ] t)
- '("@addtoreset" TeX-arg-counter "Within counter" "counter")
- '("addvspace" "space")
- '("addpenalty" "penalty")
- '("ProvidesClass" "name" [ "release information" ])
- '("ProvidesPackage" "name" [ "release information" ])
- '("ProvidesFile" "filename" [ "release information" ])
- '("NeedsTeXFormat" "format" [ "release" ])
- '("DeclareOption" "option" t)
- ;; would be great if DeclareOption RET * RET would give
- ;; \DeclareOption*!
+
+ ;; 4.1 Identification. Other '\Provide*' macros are available in
+ ;; latex.el
+ '("NeedsTeXFormat" "Format" [ "Release date" ])
+
+ ;; 4.2 Loading files
+ ;; \RequirePackage is provided in latex.el
+ '("RequirePackageWithOptions" "Package" [ "Release information" ])
+
+ '("LoadClass" [ "Options" ] "Class" [ "Release information" ])
+ '("LoadClassWithOptions" "Class" [ "Release information" ])
+
+ ;; 4.3 Option declaration
+ '("DeclareOption" "Option" t)
'("DeclareOption*" t)
+
+ ;; 4.4 Commands within option code
'("CurrentOption" 0)
- '("PassOptionsToPackage" "option list" "package")
- '("ExecuteOptions" "option list")
- '("ProcessOptions" (TeX-arg-literal "\\relax"))
- "ProcessOptions*"
'("OptionNotUsed" 0)
- ;; candidate for opt/mand toggling
- '("RequirePackage" [ "option list" ] "package" [ "release" ])
- '("LoadClass" [ "option list" ] "class" [ "release" ])
+
+ ;; 4.5 Moving options around
+ '("PassOptionsToPackage" "Option(s) list" "Package")
+ '("PassOptionsToClass" "Option(s) list" "Class")
+
+ ;; 4.6 Delaying code
'("AtEndOfPackage" t)
'("AtEndOfClass" t)
'("AtBeginDocument" t)
'("AtEndDocument" t)
- '("IfFileExists" "filename" 2)
- '("InputIfFileExists" "filename" 2)
- '("PackageWarning" "name" t)
- '("PackageWarningNoLine" "name" t)
- '("PackageInfo" "name" t)
- '("PackageError" "name" "short text" t)
- '("ClassWarning" "name" t)
- '("ClassWarningNoLine" "name" t)
- '("ClassInfo" "name" t)
- '("ClassError" "name" "short text" t)
+ '("AtBeginDvi" t)
+
+ ;; 4.7 Option processing
+ '("ProcessOptions" (TeX-arg-literal "\\relax"))
+ "ProcessOptions*"
+ '("ExecuteOptions" "Option list")
+
+ ;; 4.8 Safe file commands
+ '("IfFileExists" "File" 2)
+ '("InputIfFileExists" "File" 2)
+
+ ;; 4.9 Reporting errors, etc
+ '("ClassError" "Class name" "Error text" t)
+ '("PackageError" "Package name" "Error text" t)
+
+ '("ClassWarning" "Class name" t)
+ '("PackageWarning" "Package name" t)
+ '("ClassWarningNoLine" "Class name" t)
+ '("PackageWarningNoLine" "Package name" t)
+
+ '("ClassInfo" "Class name" t)
+ '("PackageInfo" "Package name" t)
+
'("MessageBreak" 0)
- '("@ifpackageloaded" "package" 2)
- '("@ifpackagelater" "package" "date" 2)
- '("@ifpackagewith" "package" "options" 2)
'("message" "Log Message")
- '("@ifundefined" "Macro Name" 2)
- '("@ifnextchar" (TeX-arg-literal " ") (TeX-arg-free "character") 2 )
- "expandafter"))
+
+ ;; 4.10 Defining commands
+ '("DeclareRobustCommand"
+ TeX-arg-define-macro [ TeX-arg-define-macro-arguments ] t)
+ '("DeclareRobustCommand*"
+ TeX-arg-define-macro [ TeX-arg-define-macro-arguments ] t)
+
+ '("CheckCommand" TeX-arg-macro [ TeX-arg-define-macro-arguments ] t)
+ '("CheckCommand*" TeX-arg-macro [ TeX-arg-define-macro-arguments ] t)
+
+ ;; 5.1 Layout parameters
+ ;; \paperheight & \paperwidth are provided in latex.el
+
+ ;; 5.2 Case changing
+ ;; \MakeUppercase & \MakeLppercase are provided in latex.el
+
+ ;; 5.4 Better user-defined math display environments
+ "ignorespacesafterend"
+
+ ;; 5.5 Normalising spacing
+ "normalsfcodes"
+
+ ;; Some general macros not mentioned in clsguide.pdf
+ '("@addtoreset" TeX-arg-counter "Within counter" "counter")
+ '("addpenalty" "Penalty")
+ '("@ifundefined" TeX-arg-macro 2)
+ '("@ifnextchar" (TeX-arg-literal " ") (TeX-arg-free "Character") 2)
+ '("expandafter" 0))
+
+ ;; Fontification
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("NeedsTeXFormat" "{[")
+ ("RequirePackageWithOptions" "{[")
+ ("LoadClass" "[{[")
+ ("LoadClassWithOptions" "{[")
+ ;; Don't fontify the second argument
+ ;; which will contain code:
+ ("DeclareOption" "*{")
+ ("CurrentOption" "")
+ ("OptionNotUsed" "")
+ ("PassOptionsToPackage" "{{")
+ ("PassOptionsToClass" "{{")
+
+ ("AtEndOfPackage" "")
+ ("AtEndOfClass" "")
+ ("AtBeginDocument" "")
+ ("AtEndDocument" "")
+ ("AtBeginDvi" "")
+
+ ("ProcessOptions" "*")
+ ("ExecuteOptions" "{")
+ ("DeclareRobustCommand" "*|{\\[[{")
+ ("CheckCommand" "*|{\\[[{"))
+ 'function)))
TeX-dialect)
;; Local Variables:
;; coding: utf-8
;; End:
+
+;;; ltx-base.el ends here
- [elpa] externals/auctex updated (2568505587 -> b91f15b3a3), Tassilo Horn, 2022/04/16
- [elpa] externals/auctex 86de20d0b2 02/14: Make prettification work reliably, Tassilo Horn, 2022/04/16
- [elpa] externals/auctex db75369df3 05/14: * latex.el (TeX-read-hook): Support 'include/excluded' hook., Tassilo Horn, 2022/04/16
- [elpa] externals/auctex f8d19d5cbb 07/14: ; * style/ltx-base.el ("ltx-base"): Fix entry for "@addtoreset"., Tassilo Horn, 2022/04/16
- [elpa] externals/auctex 5d951fea03 09/14: Fix bibtex dialect, Tassilo Horn, 2022/04/16
- [elpa] externals/auctex aae80c4725 11/14: ; Minor Doc fix, Tassilo Horn, 2022/04/16
- [elpa] externals/auctex 12f0b610a1 06/14: * style/ltx-base.el: Update style.,
Tassilo Horn <=
- [elpa] externals/auctex df8d6fe772 04/14: Document how to bump the required Emacs version, Tassilo Horn, 2022/04/16
- [elpa] externals/auctex 0b24e363f8 01/14: Improve indentation after '\end{macrocode}' in docTeX mode, Tassilo Horn, 2022/04/16
- [elpa] externals/auctex 35b71dfe3f 08/14: Add new style/etoolbox.el, Tassilo Horn, 2022/04/16
- [elpa] externals/auctex a25652ffe2 10/14: Update style/fbox.el to package version 0.06, Tassilo Horn, 2022/04/16
- [elpa] externals/auctex b91f15b3a3 14/14: Release GNU AUCTeX 13.1.3, Tassilo Horn, 2022/04/16
- [elpa] externals/auctex 62f8341717 03/14: Lift required GNU Emacs version to 25.1, Tassilo Horn, 2022/04/16
- [elpa] externals/auctex c534b17704 12/14: Avoid using variadic setq-local, Tassilo Horn, 2022/04/16
- [elpa] externals/auctex 615d6f2052 13/14: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2022/04/16