[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
main d22387d0 216/257: Merge remote-tracking branch 'origin/master' into
From: |
Tassilo Horn |
Subject: |
main d22387d0 216/257: Merge remote-tracking branch 'origin/master' into externals/auctex |
Date: |
Fri, 19 Apr 2024 15:37:00 -0400 (EDT) |
branch: main
commit d22387d0d253ca8f9e25f75a53a5dd474a555bf7
Merge: 0029ca41 4a843073
Author: Tassilo Horn <tsdh@gnu.org>
Commit: Tassilo Horn <tsdh@gnu.org>
Merge remote-tracking branch 'origin/master' into externals/auctex
---
Makefile.in | 11 ++--
font-latex.el | 4 ++
latex.el | 96 +++++++++++++++++++---------------
style/amsaddr.el | 37 +++++++++++++
style/amsart.el | 109 ++++++++++++++++++++++++++++++++++++--
style/array.el | 15 ++----
style/catchfilebetweentags.el | 116 +++++++++++++++++++++++++++++++++++++++++
style/fancyvrb.el | 29 ++++++++---
style/fvextra.el | 22 ++++----
style/hologo.el | 10 ++--
style/l3doc.el | 7 ++-
style/ltx-base.el | 15 +++++-
style/newfloat.el | 19 +++----
style/parskip.el | 50 ++++++++++++++++++
style/tcolorboxlib-theorems.el | 2 +-
style/xparse.el | 16 +++---
tex-bar.el | 99 ++++++++++++++++++-----------------
tex-site.el.in | 7 ++-
tex-style.el | 7 +++
tex.el | 10 ++--
20 files changed, 518 insertions(+), 163 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 9d97eff3..a2bb2d9d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -194,7 +194,8 @@ STYLESRC = style/prosper.el \
style/ifpdf.el style/iftex.el style/ifvtex.el \
style/ifxetex.el style/multibib.el style/ltcaption.el \
style/keyval.el style/kvoptions.el style/kvsetkeys.el \
- style/proc.el style/microtype.el style/tcolorboxlib-theorems.el
+ style/proc.el style/microtype.el style/tcolorboxlib-theorems.el
\
+ style/amsaddr.el style/parskip.el style/catchfilebetweentags.el
STYLEELC = $(STYLESRC:.el=.elc)
@@ -268,9 +269,11 @@ tex-site.el: tex-site.el.out auto-loads.el Makefile
cat auto-loads.el >>$@
echo "(provide 'tex-site)" >>$@ ; \
echo ";;; tex-site.el ends here" >>$@
- sed -i -e "/^(provide 'auto-loads)/d" \
- -e '/^;;; auto-loads.el ends here/d' \
- -e 's/^\(;;; auto-loads.el.*\)\( -\*- lexical-binding: t
-\*-\)/\1/' $@
+ sed -i'.tmp' \
+ -e "/^(provide 'auto-loads)/d" \
+ -e '/^;;; auto-loads.el ends here/d' \
+ -e 's/^\(;;; auto-loads.el.*\)\( -\*- lexical-binding: t
-\*-\)/\1/' $@
+ -rm -f $@.tmp
tex-site.el.out: tex-site.el.in Makefile config.status
./config.status
diff --git a/font-latex.el b/font-latex.el
index 4406dea6..52c0fca1 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -1804,6 +1804,7 @@ Used for patterns like:
;; If the closing tag is beyond the current end of
;; region, take care of it.
(when (< font-latex--updated-region-end p)
+ ;; FIXME: Why? Should this use `font-lock-flush'?
(font-lock-unfontify-region font-latex--updated-region-end p)
(setq font-latex--updated-region-end p))
(store-match-data (list beg beg beg p)))
@@ -1883,6 +1884,7 @@ The \\begin{equation} incl. arguments in the same line and
(+ limit font-latex-multiline-boundary) 'move)
(progn
(setq end (match-beginning 0))
+ ;; FIXME: Duplicate of code in `font-latex-match-math-env'.
(if (< font-latex--updated-region-end limit)
(setq font-latex--updated-region-end limit))
(when (< font-latex--updated-region-end end)
@@ -1919,6 +1921,7 @@ The \\begin{equation} incl. arguments in the same line and
(progn
(forward-char num)
(let ((p (point)))
+ ;; FIXME: Duplicate of code in `font-latex-match-math-env'.
(if (< font-latex--updated-region-end limit)
(setq font-latex--updated-region-end limit))
(when (< font-latex--updated-region-end p)
@@ -2082,6 +2085,7 @@ set to `french', and >>german<< (and 8-bit) are used if
set to `german'."
(goto-char after-beg)
(store-match-data (list after-beg after-beg beg after-beg)))
(let ((p (point)))
+ ;; FIXME: Duplicate of code in `font-latex-match-math-env'.
(if (< font-latex--updated-region-end limit)
(setq font-latex--updated-region-end limit))
(when (< font-latex--updated-region-end p)
diff --git a/latex.el b/latex.el
index 59ba9cbf..ae8dd89f 100644
--- a/latex.el
+++ b/latex.el
@@ -375,7 +375,7 @@ If so, return the second element, otherwise return nil."
(defun LaTeX-outline-name ()
"Guess a name for the current header line."
(save-excursion
- (if (re-search-forward "{\\([^\}]*\\)}" (+ (point) fill-column 10) t)
+ (if (re-search-forward "{\\([^}]*\\)}" (+ (point) fill-column 10) t)
(match-string 1)
(buffer-substring (point) (min (point-max) (+ 20 (point)))))))
@@ -2900,7 +2900,7 @@ The compatibility argument OPTIONAL and IGNORE are
ignored."
If OPTIONAL, indicate optional argument in minibuffer. PROMPT is
a string replacing the default one when asking the user for text.
This function is intended for \\verb like macros which take their
-argument in delimiters like \"\| \|\" or braces \"\{ \}\"."
+argument in delimiters like \"| |\" or braces \"{ }\"."
(let ((del (read-quoted-char
(concat "Delimiter (default "
(char-to-string LaTeX-default-verb-delimiter) "): "))))
@@ -3222,24 +3222,31 @@ prompt string. `LaTeX-default-author' is the initial
input."
(defun TeX-read-key-val (optional key-val-alist &optional prompt)
"Prompt for keys and values in KEY-VAL-ALIST and return them.
If OPTIONAL is non-nil, indicate in the prompt that we are
-reading an optional argument. KEY-VAL-ALIST is an alist. The
-car of each element should be a string representing a key and the
-optional cdr should be a list with strings to be used as values
-for the key. KEY-VAL-ALIST can be a symbol or a function call
-returning an alist. Use PROMPT as the prompt string."
+reading an optional argument. KEY-VAL-ALIST can be
+ - A function call without arguments
+ - A function object
+ - A symbol returning an alist
+ - An alist
+
+The car of each element should be a string representing a key and
+the optional cdr should be a list with strings to be used as
+values for the key. Use PROMPT as the prompt string."
(multi-prompt-key-value
(TeX-argument-prompt optional prompt "Options (k=v)")
- (cond ((and (symbolp key-val-alist)
+ (cond ((and (listp key-val-alist)
+ (symbolp (car key-val-alist))
+ (fboundp (car key-val-alist)))
+ (funcall (car key-val-alist)))
+ ((functionp key-val-alist)
+ (funcall key-val-alist))
+ ((and (symbolp key-val-alist)
(boundp key-val-alist))
(symbol-value key-val-alist))
((and (listp key-val-alist)
- (symbolp (car key-val-alist))
- (fboundp (car key-val-alist)))
- (if (> (length key-val-alist) 1)
- (eval key-val-alist t)
- (funcall (car key-val-alist))))
+ (listp (car key-val-alist)))
+ key-val-alist)
(t
- key-val-alist))))
+ (error "Cannot interpret key-val-alist %S" key-val-alist)))))
(defun TeX-arg-key-val (optional key-val-alist &optional prompt)
"Prompt for keys and values in KEY-VAL-ALIST.
@@ -3247,9 +3254,8 @@ Insert the given value as a TeX macro argument. If
OPTIONAL is
non-nil, insert it as an optional argument. KEY-VAL-ALIST is an
alist. The car of each element should be a string representing a
key and the optional cdr should be a list with strings to be used
-as values for the key. KEY-VAL-ALIST can be a symbol or a
-function call returning an alist. Use PROMPT as the prompt
-string."
+as values for the key. Refer to `TeX-read-key-val' for more
+about KEY-VAL-ALIST. Use PROMPT as the prompt string."
(let ((options (TeX-read-key-val optional key-val-alist prompt)))
(TeX-argument-insert options optional)))
@@ -3262,9 +3268,10 @@ If OPTIONAL is non-nil, indicate it in the prompt.
COLLECTION provides elements for completion and is passed to
`completing-read'. It can be:
- - A List or an alist
+ - A function call without arguments
+ - A function object
- A symbol returning a list
- - A function call
+ - A List
PROMPT replaces the standard one where \\=' (cr): \\=' is appended to
it. If you want the full control over the prompt, set COMPLETE
@@ -3278,17 +3285,18 @@ INHERIT-INPUT-METHOD are passed to `completing-read',
which see."
(concat prompt " (cr)"))
((and prompt complete)
prompt)
- (t "Option (cr)"))
+ (t nil))
+ "Option (cr)"
complete)
- (cond ((and (symbolp collection)
- (boundp collection))
- (symbol-value collection))
- ((and (listp collection)
+ (cond ((and (listp collection)
(symbolp (car collection))
(fboundp (car collection)))
- (if (> (length collection) 1)
- (eval collection t)
- (funcall (car collection))))
+ (funcall (car collection)))
+ ((functionp collection)
+ (funcall collection))
+ ((and (symbolp collection)
+ (boundp collection))
+ (symbol-value collection))
(t collection))
predicate require-match initial-input hist def inherit-input-method))
@@ -3302,7 +3310,7 @@ If OPTIONAL is non-nil, indicate it in the minibuffer and
insert
the result in brackets if not empty. The brackets used are
controlled by the string values of LEFTBRACE and RIGHTBRACE.
-For PROMPT and COMPLETE, refer to `TeX-read-completing-read'.
+For COLLECTION, PROMPT and COMPLETE, refer to `TeX-read-completing-read'.
For PREFIX, see `TeX-argument-insert'.
PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST, DEF and
INHERIT-INPUT-METHOD are passed to `completing-read', which see."
@@ -3321,11 +3329,12 @@ INHERIT-INPUT-METHOD are passed to `completing-read',
which see."
"Read multiple strings in the minibuffer, with completion and return them.
If OPTIONAL is non-nil, indicate it in the prompt.
-COLLECTION provides elements for completion and is passed to
-`completing-read'. It can be:
- - A List or an alist
+TABLE provides elements for completion and is passed to
+`TeX-completing-read-multiple'. It can be:
+ - A function call without arguments
+ - A function object
- A symbol returning a list
- - A function call
+ - A List
PROMPT replaces the standard one where \\=' (crm): \\=' is appended to
it. If you want the full control over the prompt, set COMPLETE
@@ -3340,17 +3349,18 @@ INHERIT-INPUT-METHOD are passed to
(concat prompt " (crm)"))
((and prompt complete)
prompt)
- (t "Options (crm)"))
+ (t nil))
+ "Options (crm)"
complete)
- (cond ((and (symbolp table)
- (boundp table))
- (symbol-value table))
- ((and (listp table)
+ (cond ((and (listp table)
(symbolp (car table))
(fboundp (car table)))
- (if (> (length table) 1)
- (eval table t)
- (funcall (car table))))
+ (funcall (car table)))
+ ((functionp table)
+ (funcall table))
+ ((and (symbolp table)
+ (boundp table))
+ (symbol-value table))
(t table))
predicate require-match initial-input hist def inherit-input-method))
@@ -3364,7 +3374,7 @@ If OPTIONAL is non-nil, indicate it in the minibuffer and
insert
the result in brackets if not empty. The brackets used are
controlled by the string values of LEFTBRACE and RIGHTBRACE.
-For PROMPT and COMPLETE, refer to `TeX-read-completing-read-multiple'.
+For TABLE, PROMPT and COMPLETE, refer to `TeX-read-completing-read-multiple'.
For PREFIX, see `TeX-argument-insert'.
PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST, DEF and
INHERIT-INPUT-METHOD are passed to
@@ -6770,13 +6780,13 @@ you did something too clever, or AUCTeX something too
stupid.")
("Bad \\\\line or \\\\vector argument.*" .
"The first argument of a \\line or \\vector command, which specifies the
-slope, is illegal\.")
+slope, is illegal.")
("Bad math environment delimiter.*" .
"TeX has found either a math-mode-starting command such as \\[ or \\(
when it is already in math mode, or else a math-mode-ending command
such as \\) or \\] while in LR or paragraph mode. The problem is caused
-by either unmatched math mode delimiters or unbalanced braces\.")
+by either unmatched math mode delimiters or unbalanced braces.")
("Bad use of \\\\\\\\.*" .
"A \\\\ command appears between paragraphs, where it makes no sense. This
diff --git a/style/amsaddr.el b/style/amsaddr.el
new file mode 100644
index 00000000..e5203653
--- /dev/null
+++ b/style/amsaddr.el
@@ -0,0 +1,37 @@
+;;; amsaddr.el --- AUCTeX style for the (LaTeX) amsaddr package -*-
lexical-binding: t; -*-
+
+;; Copyright (C) 2022 Free Software Foundation, Inc.
+
+;; Author: Uwe Brauer <oub@mat.ucm.es>
+;; Maintainer: auctex-devel@gnu.org
+;; Created: 2022-09-04
+;; Keywords: tex
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING. If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Commentary:
+
+;; This file adds support for the amsaddr package.
+
+;;; Code:
+
+(defvar LaTeX-amsaddr-package-options
+ '("foot")
+ "Package options for the amsaddr package.")
+
+;;; amsaddr.el ends here
diff --git a/style/amsart.el b/style/amsart.el
index 7f93f1af..67a587a4 100644
--- a/style/amsart.el
+++ b/style/amsart.el
@@ -1,16 +1,117 @@
;;; amsart.el --- Style hook for the AMS-LaTeX article document class. -*-
lexical-binding: t; -*-
+;; Copyright (C) 1994-2022 Free Software Foundation, Inc.
+
+;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
+;; Maintainer: auctex-devel@gnu.org
+;; Created: 1994-01-05
+;; Keywords: tex
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING. If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
;;; Code:
(require 'tex)
(require 'latex)
+;; Silence the compiler:
+(declare-function font-latex-add-keywords
+ "font-latex"
+ (keywords class))
+(declare-function font-latex-set-syntactic-keywords
+ "font-latex")
+
+(defvar LaTeX-amsart-class-options
+ '("a4paper" "letterpaper" "landscape" "portrait"
+ "twoside" "oneside" "draft" "final"
+ "8pt" "9pt" "10pt" "11pt" "12pt"
+ "titlepage" "notitlepage" "onecolumn" "twocolumn"
+ "leqno" "reqno" "centertags" "tbtags" "fleqn"
+ "nomath" "noamsfonts" "psamsfonts")
+ "Class options for the amsart class.")
+
(TeX-add-style-hook
"amsart"
- (function
- (lambda ()
- (TeX-run-style-hooks "amsmath" "amsthm")
- (LaTeX-add-environments "abstract")))
+ (lambda ()
+
+ ;; Load amsmath.el if the option nomath isn't given:
+ (unless (LaTeX-provided-class-options-member "amsart" "nomath")
+ (TeX-run-style-hooks "amsmath"))
+ ;; Same for amsfonts.el:
+ (unless (LaTeX-provided-class-options-member "amsart" "noamsfonts")
+ (TeX-run-style-hooks "amsfonts"))
+ ;; amsthm is built-in:
+ (TeX-run-style-hooks "amsthm")
+
+ (TeX-add-symbols
+ '("address" 1)
+ '("author" ["Short author(s)"] (LaTeX-arg-author "Long author(s)"))
+ '("curraddr" 1)
+ '("dedicatory" 1)
+ '("email" 1)
+ '("keywords" 1)
+ '("subjclass" ["Year"] "List of subjects")
+ '("title" ["Short Title"] "Title")
+ '("urladdr" 1))
+
+ (LaTeX-add-environments "abstract")
+
+ (LaTeX-largest-level-set "section")
+ (LaTeX-add-counters "part" "section" "subsection" "subsubsection"
+ "paragraph" "subparagraph"
+ "figure" "table")
+ (LaTeX-add-pagestyles "headings" "myheadings")
+
+ ;; Tell AUCTeX about \specialsection:
+ (LaTeX-section-list-add-locally '("specialsection" 2))
+ (LaTeX-paragraph-commands-add-locally "specialsection")
+ (add-to-list (make-local-variable 'LaTeX-section-label)
+ '("specialsection" . "sec:")
+ t)
+
+ ;; Tell RefTeX about \specialsection and append the entry to
+ ;; `reftex-section-levels':
+ (when (boundp 'reftex-section-levels)
+ (add-to-list (make-local-variable 'reftex-section-levels)
+ '("specialsection" . 2)
+ t))
+
+ ;; These macros will contain links etc., so treat the argument
+ ;; verbatim:
+ (add-to-list 'LaTeX-verbatim-macros-with-braces-local "email")
+ (add-to-list 'LaTeX-verbatim-macros-with-braces-local "urladdr")
+
+ ;; Fontification
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("author" "[{")
+ ("contrib" "[{")
+ ("curraddr" "{")
+ ("dedicatory" "{")
+ ("keywords" "{")
+ ("subjclass" "[{")
+ ("title" "[{")
+ ("email" "")
+ ("urladdr" ""))
+ 'textual)
+ (font-latex-add-keywords '(("specialsection" "{"))
+ 'sectioning-2)
+ (font-latex-set-syntactic-keywords)))
TeX-dialect)
;;; amsart.el ends here.
diff --git a/style/array.el b/style/array.el
index be7baf36..b564e055 100644
--- a/style/array.el
+++ b/style/array.el
@@ -1,6 +1,6 @@
;;; array.el --- AUCTeX style for `array.sty' -*- lexical-binding: t; -*-
-;; Copyright (C) 2013-2021 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2022 Free Software Foundation, Inc.
;; Author: Mads Jensen <mje@inducks.org>
;; Maintainer: auctex-devel@gnu.org
@@ -56,16 +56,11 @@ package.")
(LaTeX-array-update-column-letters)))
(defun LaTeX-array-update-column-letters ()
- "Update and uniquify the value of `LaTeX-array-column-letters'
-and make it buffer local. "
+ "Update and uniquify the local value of `LaTeX-array-column-letters'."
(set (make-local-variable 'LaTeX-array-column-letters)
- (mapconcat #'identity
- (TeX-delete-duplicate-strings
- (split-string
- (concat LaTeX-array-column-letters
- (mapconcat #'car (LaTeX-array-newcolumntype-list)
""))
- "" t))
- "")))
+ (let* ((newtypes (mapconcat #'car (LaTeX-array-newcolumntype-list) ""))
+ (alltypes (concat LaTeX-array-column-letters newtypes)))
+ (seq-concatenate 'string (seq-uniq alltypes #'=)))))
(add-hook 'TeX-auto-prepare-hook #'LaTeX-array-auto-prepare t)
(add-hook 'TeX-auto-cleanup-hook #'LaTeX-array-auto-cleanup t)
diff --git a/style/catchfilebetweentags.el b/style/catchfilebetweentags.el
new file mode 100644
index 00000000..27c67e23
--- /dev/null
+++ b/style/catchfilebetweentags.el
@@ -0,0 +1,116 @@
+;;; catchfilebetweentags.el --- AUCTeX style for catchfilebetweentags package
-*- lexical-binding: t; -*-
+
+;; Copyright (C) 2022 Free Software Foundation, Inc.
+
+;; Author: Uwe Brauer <oub@mat.ucm.es>
+;; Maintainer: auctex-devel@gnu.org
+;; Created: Aug 23, 2022
+;; Keywords: tex
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING. If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Commentary:
+
+;; This file adds support for the catchfilebetweentags package.
+
+;; Acknowledgements
+;; Arash Esbati <arash@gnu.org> for, basically, a complete rewrite, thanks.
+
+;;; Code:
+
+(require 'tex)
+(require 'latex)
+
+;; Silence the compiler:
+(declare-function font-latex-add-keywords
+ "font-latex"
+ (keywords class))
+
+(defvar-local LaTeX-catchfilebetweentags-counter nil
+ "Counter for LaTeX-catchfilebetweentags numbers.")
+
+;; Scanning function, stolen from markdown-mode
+(defun LaTeX-catchfilebetweentags-counter-inc ()
+ "Increment `LaTeX-catchfilebetweentags-counter' and return the new value."
+ (when (null LaTeX-catchfilebetweentags-counter)
+ (setq LaTeX-catchfilebetweentags-counter 0)
+ (save-excursion
+ (goto-char (point-min))
+ (while (re-search-forward (concat "^%<\\*\\([^>]+\\)>$")
+ (point-max) t)
+ (let ((fn (string-to-number (match-string 1))))
+ (when (> fn LaTeX-catchfilebetweentags-counter)
+ (setq LaTeX-catchfilebetweentags-counter fn))))))
+ (setq LaTeX-catchfilebetweentags-counter
+ (1+ LaTeX-catchfilebetweentags-counter)))
+
+(defun LaTeX-env-catchfilebetweentags (_environment)
+ "Insert a tag-skeleton defined by `LaTeX-catchfilebetweentags'.
+ENVIRONMENT is ignored."
+ (let* ((fn (when LaTeX-catchfilebetweentags-use-numeric-label
+ (LaTeX-catchfilebetweentags-counter-inc)))
+ (tag (TeX-read-string
+ (if fn (format "Tag (default %s): " fn) "Tag: ")
+ nil nil (when fn (number-to-string fn)))))
+ (unless (bolp)
+ (newline)
+ (delete-horizontal-space))
+ (save-excursion
+ (insert (concat (format "%%<*%s>" tag)
+ "\n\n"
+ (format "%%</%s>" tag)))))
+ (forward-line))
+
+(TeX-add-style-hook
+ "catchfilebetweentags"
+ (lambda ()
+ (TeX-add-symbols
+ '("ExecuteMetaData"
+ ;; Act like \include and not like \input:
+ [TeX-arg-input-file "File" t] "Tag")
+ '("ExecuteMetaData*"
+ [TeX-arg-input-file "File" t] "Tag")
+
+ '("CatchFileBetweenTags"
+ TeX-arg-define-macro (TeX-arg-input-file "File-name" t) "Tag")
+ '("CatchFileBetweenTags*"
+ TeX-arg-define-macro (TeX-arg-input-file "File-name" t) "Tag")
+
+ '("CatchFileBetweenDelims"
+ TeX-arg-define-macro (TeX-arg-input-file "File-name" t)
+ "Start delimiter" "Stop delimiter" ["Setup"]))
+
+ (LaTeX-add-environments
+ '("catchfilebetweenfiletags" LaTeX-env-catchfilebetweentags))
+
+ ;; Add `LaTeX-catchfilebetweentags-counter' to
+ ;; `TeX-normal-mode-reset-list' in case the variable gets out of
+ ;; sync:
+ (add-to-list 'TeX-normal-mode-reset-list
+ 'LaTeX-catchfilebetweentags-counter)
+
+ ;; Fontification
+ (when (and (featurep 'font-latex)
+ (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("ExecuteMetaData" "*[{")
+ ("CatchFileBetweenTags" "*|{\\{{")
+ ("CatchFileBetweenDelims" "|{\\{{{["))
+ 'function)))
+ TeX-dialect)
+
+;;; catchfilebetweentags.el ends here
diff --git a/style/fancyvrb.el b/style/fancyvrb.el
index 22e52c26..a9ea0a44 100644
--- a/style/fancyvrb.el
+++ b/style/fancyvrb.el
@@ -1,6 +1,6 @@
-;;; fancyvrb.el --- AUCTeX style for `fancyvrb.sty' version 3.6. -*-
lexical-binding: t; -*-
+;;; fancyvrb.el --- AUCTeX style for `fancyvrb.sty' version 4.5. -*-
lexical-binding: t; -*-
-;; Copyright (C) 2013, 2014, 2016-2021 Free Software Foundation, Inc.
+;; Copyright (C) 2013, 2014, 2016-2022 Free Software Foundation, Inc.
;; Maintainer: auctex-devel@gnu.org
;; Author: Mosè Giordano <mose@gnu.org>
@@ -25,7 +25,7 @@
;;; Commentary:
-;; This file adds support for `fancyvrb.sty' version 3.6.
+;; This file adds support for `fancyvrb.sty' version 4.5.
;; This style has some capabilities to parse user defined macros,
;; environments and saved blocks with `SaveVerbatim' environments and
@@ -571,9 +571,15 @@ ENV is the name of current environment as a string."
;; Verbatim material in footnotes
"VerbatimFootnotes"
;; Improved verbatim commands
- '("Verb" [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)] TeX-arg-verb)
- ;; \Verb also has a starred version:
- '("Verb*" [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)] TeX-arg-verb)
+ '("Verb" [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)]
+ (TeX-arg-conditional (member "fvextra" (TeX-style-list))
+ (TeX-arg-verb-delim-or-brace)
+ (TeX-arg-verb)))
+ ;; \Verb also has a starred version
+ '("Verb*" [TeX-arg-key-val (LaTeX-fancyvrb-key-val-options)]
+ (TeX-arg-conditional (member "fvextra" (TeX-style-list))
+ (TeX-arg-verb-delim-or-brace)
+ (TeX-arg-verb)))
'("DefineShortVerb" (TeX-arg-eval
TeX-read-string
(TeX-argument-prompt nil nil "Character")
@@ -618,11 +624,18 @@ ENV is the name of current environment as a string."
(TeX-argument-prompt nil nil "Save name"))))
(LaTeX-add-fancyvrb-saveverbs name)
(format "%s" name))))
- TeX-arg-verb)
+ (TeX-arg-conditional (member "fvextra" (TeX-style-list))
+ (TeX-arg-verb-delim-or-brace)
+ (TeX-arg-verb)))
'("UseVerb" (TeX-arg-eval
completing-read
(TeX-argument-prompt nil nil "Saved name")
(LaTeX-fancyvrb-saveverb-list)))
+ ;; \UseVerb also has a starred version
+ '("UseVerb*" (TeX-arg-eval
+ completing-read
+ (TeX-argument-prompt nil nil "Saved name")
+ (LaTeX-fancyvrb-saveverb-list)))
'("UseVerbatim" (TeX-arg-eval completing-read
(TeX-argument-prompt nil nil "Saved name")
(LaTeX-fancyvrb-saveverbatim-list)))
@@ -758,7 +771,7 @@ ENV is the name of current environment as a string."
'reference)
(font-latex-add-keywords '(("Verb" "*[") ; The second argument is
verbatim.
("SaveVerb" "[{")
- ("UseVerb" "{")
+ ("UseVerb" "*{")
("UseVerbatim" "{")
("LUseVerbatim" "{")
("BUseVerbatim" "{"))
diff --git a/style/fvextra.el b/style/fvextra.el
index 31092169..3bb11e81 100644
--- a/style/fvextra.el
+++ b/style/fvextra.el
@@ -1,6 +1,6 @@
;;; fvextra.el --- AUCTeX style for `fvextra.sty' (v1.4) -*- lexical-binding:
t; -*-
-;; Copyright (C) 2017--2021 Free Software Foundation, Inc.
+;; Copyright (C) 2017--2022 Free Software Foundation, Inc.
;; Author: Arash Esbati <arash@gnu.org>
;; Maintainer: auctex-devel@gnu.org
@@ -34,14 +34,12 @@
(require 'tex)
(require 'latex)
-;; Needed for compiling `cl-pushnew':
-(eval-when-compile
- (require 'cl-lib))
-
;; Silence the compiler:
(declare-function font-latex-add-keywords
"font-latex"
(keywords class))
+(declare-function font-latex-set-syntactic-keywords
+ "font-latex")
(declare-function LaTeX-color-definecolor-list "color" ())
(declare-function LaTeX-xcolor-definecolor-list "xcolor" ())
@@ -138,11 +136,12 @@
"FancyVerbBreakBeforeBreak"
"FancyVerbBreakAfterBreak")
- ;; Add \EscVerb*? to `LaTeX-verbatim-macros-with-braces-local':
- (add-to-list 'LaTeX-verbatim-macros-with-braces-local
- "EscVerb" t)
- (add-to-list 'LaTeX-verbatim-macros-with-braces-local
- "EscVerb*" t)
+ ;; Add \Verb*? and \EscVerb*? to
+ ;; `LaTeX-verbatim-macros-with-braces-local':
+ (let ((macs '("Verb" "Verb*"
+ "EscVerb" "EscVerb*")))
+ (dolist (mac macs)
+ (add-to-list 'LaTeX-verbatim-macros-with-braces-local mac t)))
;; Fontification
(when (and (fboundp 'font-latex-add-keywords)
@@ -150,7 +149,8 @@
(font-latex-add-keywords '(("fvinlineset" "{"))
'function)
(font-latex-add-keywords '(("EscVerb" "*["))
- 'textual)))
+ 'textual)
+ (font-latex-set-syntactic-keywords)))
TeX-dialect)
(defvar LaTeX-fvextra-package-options nil
diff --git a/style/hologo.el b/style/hologo.el
index 25f8105e..f5030fd5 100644
--- a/style/hologo.el
+++ b/style/hologo.el
@@ -1,6 +1,6 @@
;;; hologo.el --- AUCTeX style for `hologo.sty' (v1.10) -*- lexical-binding:
t; -*-
-;; Copyright (C) 2015--2021 Free Software Foundation, Inc.
+;; Copyright (C) 2015--2022 Free Software Foundation, Inc.
;; Author: Arash Esbati <arash@gnu.org>
;; Maintainer: auctex-devel@gnu.org
@@ -201,13 +201,13 @@
;; Additional user macros
`("hologoVariant"
LaTeX-hologo--arg-use-region-or-query-logo-name
- (TeX-arg-key-val (append ,LaTeX-hologo-key-val-options-local
- ,LaTeX-hologo-key-val-options-global)))
+ (TeX-arg-key-val ,(append LaTeX-hologo-key-val-options-local
+ LaTeX-hologo-key-val-options-global)))
`("HologoVariant"
LaTeX-hologo--arg-use-region-or-query-logo-name
- (TeX-arg-key-val (append ,LaTeX-hologo-key-val-options-local
- ,LaTeX-hologo-key-val-options-global)))
+ (TeX-arg-key-val ,(append LaTeX-hologo-key-val-options-local
+ LaTeX-hologo-key-val-options-global)))
'("hologoList" 0)
diff --git a/style/l3doc.el b/style/l3doc.el
index 8364e74e..69ae346b 100644
--- a/style/l3doc.el
+++ b/style/l3doc.el
@@ -184,10 +184,9 @@ For syntax environment from l3doc class."
'("parg" "Picture mode argument")
'("file" "File name")
- '("env" LaTeX-env-args
- (TeX-arg-eval completing-read
- (TeX-argument-prompt nil nil "Environment")
- (LaTeX-environment-list)))
+ '("env" (TeX-arg-eval completing-read
+ (TeX-argument-prompt nil nil "Environment")
+ (LaTeX-environment-list)))
'("pkg" "Package name")
'("cls" "Class name")
diff --git a/style/ltx-base.el b/style/ltx-base.el
index d10a1379..693308a3 100644
--- a/style/ltx-base.el
+++ b/style/ltx-base.el
@@ -123,7 +123,13 @@
'("addpenalty" "Penalty")
'("@ifundefined" TeX-arg-macro 2)
'("@ifnextchar" (TeX-arg-literal " ") (TeX-arg-free "Character") 2)
- '("expandafter" 0))
+ '("expandafter" 0)
+
+ ;; These macros are currently (June 2022) described in ltkeys.dtx:
+ '("DeclareKeys" ["Family"] t)
+ '("DeclareUnknownKeyHandler" ["Family"] t)
+ '("ProcessKeyOptions" ["Family"])
+ '("SetKeys" ["Family"] t))
;; Fontification
(when (and (featurep 'font-latex)
@@ -149,7 +155,12 @@
("ProcessOptions" "*")
("ExecuteOptions" "{")
("DeclareRobustCommand" "*|{\\[[{")
- ("CheckCommand" "*|{\\[[{"))
+ ("CheckCommand" "*|{\\[[{")
+
+ ("DeclareKeys" "[{")
+ ("DeclareUnknownKeyHandler" "[{")
+ ("ProcessKeyOptions" "[")
+ ("SetKeys" "[{"))
'function)))
TeX-dialect)
diff --git a/style/newfloat.el b/style/newfloat.el
index 5cde1d4c..77239b97 100644
--- a/style/newfloat.el
+++ b/style/newfloat.el
@@ -169,7 +169,7 @@ If `caption.el' is loaded, add the new floating environment
to
(TeX-arg-eval completing-read
(TeX-argument-prompt nil nil "Floating environment")
(mapcar #'car
(LaTeX-newfloat-DeclareFloatingEnvironment-list)))
- (TeX-arg-key-val (LaTeX-newfloat-key-val-options-local)))
+ (TeX-arg-key-val (LaTeX-newfloat-key-val-options)))
'("ForEachFloatingEnvironment" t)
'("ForEachFloatingEnvironment*" t)
@@ -180,16 +180,13 @@ If `caption.el' is loaded, add the new floating
environment to
(mapcar #'car
(LaTeX-newfloat-DeclareFloatingEnvironment-list)))
t)
- '("newfloatsetup"
- (TeX-arg-eval
- (lambda ()
- (let ((keyvals (TeX-read-key-val
- nil
- (append '(("chapterlistsgap"))
- (if (< (LaTeX-largest-level) 2)
- '(("within" ("chapter" "section" "none")))
- '(("within" ("section" "none"))))))))
- (format "%s" keyvals))))))
+ `("newfloatsetup"
+ (TeX-arg-key-val
+ ,(lambda ()
+ (append '(("chapterlistsgap"))
+ (if (< (LaTeX-largest-level) 2)
+ '(("within" ("chapter" "section" "none")))
+ '(("within" ("section" "none")))))))))
;; Fontification
(when (and (featurep 'font-latex)
diff --git a/style/parskip.el b/style/parskip.el
new file mode 100644
index 00000000..861d4698
--- /dev/null
+++ b/style/parskip.el
@@ -0,0 +1,50 @@
+;;; parskip.el --- AUCTeX style for `parskip.sty' (v2.0h) -*-
lexical-binding: t; -*-
+
+;; Copyright (C) 2022 Free Software Foundation, Inc.
+
+;; Author: Arash Esbati <arash@gnu.org>
+;; Maintainer: auctex-devel@gnu.org
+;; Created: 2022-10-07
+;; Keywords: tex
+
+;; This file is part of AUCTeX.
+
+;; AUCTeX is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; AUCTeX is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with AUCTeX; see the file COPYING. If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Commentary:
+
+;; This file adds support for `parskip.sty' (v2.0h) from 2021/03/14.
+;; `parskip.sty' is part of TeXLive. Note that the parskip package
+;; doesn't offer any document user commands and just needs loading
+;; with \usepackage. Hence this style provides only one function for
+;; key=val query of package options.
+
+;;; Code:
+
+(require 'tex)
+(require 'latex)
+
+(defun LaTeX-parskip-package-options ()
+ "Prompt for package options for the parskip package."
+ (let ((len (mapcar (lambda (x)
+ (concat TeX-esc (car x)))
+ (LaTeX-length-list))))
+ (TeX-read-key-val t `(("skip" ,len)
+ ("tocskip" ,len)
+ ("indent" ,len)
+ ("parfill" ,len)))))
+
+;;; parskip.el ends here
diff --git a/style/tcolorboxlib-theorems.el b/style/tcolorboxlib-theorems.el
index 8c4eb7d4..20aa710d 100644
--- a/style/tcolorboxlib-theorems.el
+++ b/style/tcolorboxlib-theorems.el
@@ -312,6 +312,6 @@ empty."
(font-latex-add-keywords '(("newtcbtheorem" "[{{{{")
("renewtcbtheorem" "[{{{{"))
'function)))
- LaTeX-dialect)
+ TeX-dialect)
;;; tcolorboxlib-theorems.el ends here
diff --git a/style/xparse.el b/style/xparse.el
index b2a2fb05..397a0c4b 100644
--- a/style/xparse.el
+++ b/style/xparse.el
@@ -1,4 +1,4 @@
-;;; xparse.el --- AUCTeX style for `xparse.sty' version 2020-03-06 -*-
lexical-binding: t; -*-
+;;; xparse.el --- AUCTeX style for `xparse.sty' version 2022-07-05 -*-
lexical-binding: t; -*-
;; Copyright (C) 2013, 2020--2022 Free Software Foundation, Inc.
@@ -25,7 +25,7 @@
;;; Commentary:
-;; This file adds basic support for `xparse.sty' version 2020-03-06.
+;; This file adds basic support for `xparse.sty' version 2022-07-05.
;; It parses argument specification of macros and environments.
;; The "yet not more supported" specifiers `l', `u', `g' and `G' are
@@ -118,15 +118,15 @@ TYPE is one of the symbols mac or env."
(goto-char (point-min))
(insert (replace-regexp-in-string "[ \t\r\n%]" "" spec))
(goto-char (point-min))
- (while (looking-at-p "[+!>bmrRvodODsteE]")
- (cond (;; + or !: Long argument or space aware: Move over
+ (while (looking-at-p "[+!>=bmrRvodODsteE]")
+ (cond ((looking-at-p "[+!b]")
+ ;; + or !: Long argument or space aware: Move over
;; them. b is special; only available for
;; enviroments
- (looking-at-p "[+!b]")
(forward-char 1))
- ((looking-at-p ">")
- ;; Argument processors: Move over > and a balanced
- ;; {}
+ ;; Argument processors and key-val modifier: Move
+ ;; over [>=] and a balanced {}
+ ((looking-at-p "[>=]")
(forward-char 1)
(forward-sexp))
;; Mandatory arguments:
diff --git a/tex-bar.el b/tex-bar.el
index 9df6c870..5c36f24b 100644
--- a/tex-bar.el
+++ b/tex-bar.el
@@ -133,43 +133,43 @@ the argument BUTTON-ALIST in function
`toolbarx-install-toolbar'."
:group 'TeX-tool-bar-button-definitions)
(defcustom TeX-bar-TeX-button-alist
- '((tex :image (lambda nil (if TeX-PDF-mode "pdftex" "tex"))
+ `((tex :image ,(lambda nil (if TeX-PDF-mode "pdftex" "tex"))
:command (progn
(TeX-save-document #'TeX-master-file)
(TeX-command "TeX" #'TeX-master-file -1))
- :help (lambda (&rest ignored)
- (TeX-bar-help-from-command-list "TeX")))
+ :help ,(lambda (&rest _ignored)
+ (TeX-bar-help-from-command-list "TeX")))
(pdftex :image "pdftex"
:command (progn
(TeX-save-document #'TeX-master-file)
(TeX-command "PDFTeX" #'TeX-master-file -1))
- :help (lambda (&rest ignored)
- (TeX-bar-help-from-command-list "PDFTeX")))
+ :help ,(lambda (&rest _ignored)
+ (TeX-bar-help-from-command-list "PDFTeX")))
(next-error :image "error"
:command TeX-next-error
:enable (TeX-error-report-has-errors-p)
:visible (TeX-error-report-has-errors-p))
- (view :image (lambda nil (if TeX-PDF-mode "viewpdf" "viewdvi"))
+ (view :image ,(lambda nil (if TeX-PDF-mode "viewpdf" "viewdvi"))
:command (TeX-command "View" #'TeX-master-file -1)
- :help (lambda (&rest ignored)
- (TeX-bar-help-from-command-list "View")))
+ :help ,(lambda (&rest _ignored)
+ (TeX-bar-help-from-command-list "View")))
(file :image "dvips"
:command (TeX-command "File" #'TeX-master-file -1)
:visible (not TeX-PDF-mode)
- :help (lambda (&rest ignored)
- (TeX-bar-help-from-command-list "File")))
+ :help ,(lambda (&rest _ignored)
+ (TeX-bar-help-from-command-list "File")))
(bibtex :image "bibtex"
:command (TeX-command "BibTeX" #'TeX-master-file -1)
- :help (lambda (&rest ignored)
- (TeX-bar-help-from-command-list "BibTeX")))
+ :help ,(lambda (&rest _ignored)
+ (TeX-bar-help-from-command-list "BibTeX")))
(clean :image "delete"
:command (TeX-command "Clean" #'TeX-master-file -1)
- :help (lambda (&rest ignored)
- (TeX-bar-help-from-command-list "Clean")))
+ :help ,(lambda (&rest _ignored)
+ (TeX-bar-help-from-command-list "Clean")))
(spell :image "spell"
:command (TeX-command "Spell" #'TeX-master-file -1)
- :help (lambda (&rest ignored)
- (TeX-bar-help-from-command-list "Spell"))))
+ :help ,(lambda (&rest _ignored)
+ (TeX-bar-help-from-command-list "Spell"))))
;; latex-symbols-experimental?
"Alist for button definitions in TeX bar.
Value should le a list where each element is of format (KEY .
@@ -269,48 +269,48 @@ the argument BUTTON-ALIST in function
`toolbarx-install-toolbar'."
:group 'TeX-tool-bar-button-definitions)
(defcustom TeX-bar-LaTeX-button-alist
- '((latex :image (lambda nil (if TeX-PDF-mode "pdftex" "tex"))
+ `((latex :image ,(lambda nil (if TeX-PDF-mode "pdftex" "tex"))
:command (progn
(TeX-save-document #'TeX-master-file)
(TeX-command "LaTeX" #'TeX-master-file -1))
- :help (lambda (&rest ignored)
- (TeX-bar-help-from-command-list "LaTeX")))
+ :help ,(lambda (&rest ignored)
+ (TeX-bar-help-from-command-list "LaTeX")))
(pdflatex :image "pdftex"
:command (progn
(TeX-save-document #'TeX-master-file)
(TeX-command "PDFLaTeX" #'TeX-master-file -1))
- :help (lambda (&rest ignored)
- (TeX-bar-help-from-command-list "PDFLaTeX")))
+ :help ,(lambda (&rest ignored)
+ (TeX-bar-help-from-command-list "PDFLaTeX")))
(next-error :image "error"
:command TeX-next-error
:enable (TeX-error-report-has-errors-p)
:visible (TeX-error-report-has-errors-p))
- (view :image (lambda nil (if TeX-PDF-mode "viewpdf" "viewdvi"))
+ (view :image ,(lambda nil (if TeX-PDF-mode "viewpdf" "viewdvi"))
:command (TeX-command "View" #'TeX-master-file -1)
- :help (lambda (&rest ignored)
- (TeX-bar-help-from-command-list "View")))
+ :help ,(lambda (&rest ignored)
+ (TeX-bar-help-from-command-list "View")))
(file :image "dvips"
:command (TeX-command "File" #'TeX-master-file -1)
:visible (not TeX-PDF-mode)
- :help (lambda (&rest ignored)
- (TeX-bar-help-from-command-list "File")))
+ :help ,(lambda (&rest ignored)
+ (TeX-bar-help-from-command-list "File")))
(bibtex :image "bibtex"
:command (TeX-command (if LaTeX-using-Biber "Biber" "BibTeX")
#'TeX-master-file -1)
- :help (lambda (&rest ignored)
- (TeX-bar-help-from-command-list
- (if LaTeX-using-Biber "Biber" "BibTeX"))))
+ :help ,(lambda (&rest ignored)
+ (TeX-bar-help-from-command-list
+ (if LaTeX-using-Biber "Biber" "BibTeX"))))
(clean :image "delete"
:command (TeX-command "Clean" #'TeX-master-file -1)
- :help (lambda (&rest ignored)
- (TeX-bar-help-from-command-list "Clean")))
+ :help ,(lambda (&rest ignored)
+ (TeX-bar-help-from-command-list "Clean")))
(spell :image "spell"
:command (TeX-command "Spell" #'TeX-master-file -1)
- :help (lambda (&rest ignored)
- (TeX-bar-help-from-command-list "Spell")))
+ :help ,(lambda (&rest ignored)
+ (TeX-bar-help-from-command-list "Spell")))
(latex-symbols-experimental . (:alias :eval-group
- LaTeX-symbols-toolbar-switch-contents
- LaTeX-symbols-toolbar-contents)))
+ LaTeX-symbols-toolbar-switch-contents
+ LaTeX-symbols-toolbar-contents)))
"Alist for button definitions in TeX bar.
Value should le a list where each element is of format (KEY .
PROPS), where KEY is a symbol that labels the button and PROPS is
@@ -454,32 +454,35 @@ format of the argument MEANING-ALIST in the mentioned
function."
(cons (cons menu-str (list menu-buttons))
menu-strings-alist-temp)))))))))))
(list-strings (let* ((list-str-temp))
- (dolist (i menu-strings-buttons-alist
- (nreverse list-str-temp))
+ (dolist (i menu-strings-buttons-alist)
(setq list-str-temp (cons (car i)
- list-str-temp))))))
+ list-str-temp)))
+ (nreverse list-str-temp))))
+ ;; Will be defined by running LaTeX-install-toolbar.
+ (defvar LaTeX-symbols-active-menuitem)
(defvar LaTeX-symbols-toolbar-visible-flag nil
"Non-nil means that the LaTeX symbols on toolbar are visible.
Internal variable.")
(defconst LaTeX-symbols-toolbar-switch-contents
`(;; the on-off switch button
(latex-symbols-switch
- :image (lambda nil (if LaTeX-symbols-toolbar-visible-flag
- "ltx-symb-turn-off"
- "ltx-symb-turn-on"))
+ :image ,(lambda ()
+ (if LaTeX-symbols-toolbar-visible-flag
+ "ltx-symb-turn-off"
+ "ltx-symb-turn-on"))
:command (progn
(setq LaTeX-symbols-toolbar-visible-flag
(not LaTeX-symbols-toolbar-visible-flag))
(toolbarx-refresh))
;; help message depends on if symb-toolbar is on or off, and in
;; the name of the current class of symbols
- :help (lambda (&rest ignore)
- (concat "Turn "
- (if LaTeX-symbols-toolbar-visible-flag "off " "on ")
- "the toolbar of LaTeX symbols (current class: "
- (nth (1- LaTeX-symbols-active-menuitem)
- (quote ,list-strings))
- ")")))
+ :help ,(lambda (&rest _ignore)
+ (concat "Turn "
+ (if LaTeX-symbols-toolbar-visible-flag "off " "on ")
+ "the toolbar of LaTeX symbols (current class: "
+ (nth (1- LaTeX-symbols-active-menuitem)
+ list-strings)
+ ")")))
;; the dropdown button, that also switch on the symbols
,(append '(:dropdown-group)
list-strings
diff --git a/tex-site.el.in b/tex-site.el.in
index e2689bbd..47f8e3ee 100644
--- a/tex-site.el.in
+++ b/tex-site.el.in
@@ -107,7 +107,12 @@ functions into the respective function cell of the mode."
(setq elt (car (pop list)))
(let ((dst (intern (concat "TeX-" (symbol-name elt)))))
(if (memq elt value)
- (advice-add elt :override dst)
+ (advice-add elt :override dst
+ ;; COMPATIBILITY for Emacs 28.[12]
+ ;; Give it higher precedence than the :around
+ ;; advice given to `tex-mode' in tex-mode.el.
+ ;;
<URL:https://lists.gnu.org/r/auctex-devel/2022-09/msg00050.html>
+ '((depth . -10)))
(advice-remove elt dst))))))
(defcustom TeX-modes
diff --git a/tex-style.el b/tex-style.el
index 3ef92d27..b880bfcc 100644
--- a/tex-style.el
+++ b/tex-style.el
@@ -226,6 +226,13 @@ override the autodetection of the biblatex backend.")
(make-variable-buffer-local 'LaTeX-biblatex-use-Biber)
(put 'LaTeX-biblatex-use-Biber 'safe-local-variable #'booleanp)
+;; style/catchfilebetweentags.el
+
+(defcustom LaTeX-catchfilebetweentags-use-numeric-label t
+ "If non-nil, insert automatic numerical labels.
+Otherwise the prompt asks for a label name."
+ :type 'boolean)
+
;; style/comment.el
(defcustom LaTeX-comment-env-list '("comment")
diff --git a/tex.el b/tex.el
index 1497f228..e9690b9c 100644
--- a/tex.el
+++ b/tex.el
@@ -36,6 +36,9 @@
(eval-when-compile
(require 'cl-lib))
(require 'texmathp)
+;; seq.el is preloaded in Emacs 29, so the next form can be removed
+;; once 29 is the minimum required Emacs version
+(require 'seq)
;; Require dbus at compile time to get macro definition of
;; `dbus-ignore-errors'.
(eval-when-compile (require 'dbus))
@@ -3338,8 +3341,9 @@ is called with \\[universal-argument]."
'TeX-macro-history TeX-default-macro))))
(when (called-interactively-p 'any)
(setq TeX-default-macro symbol))
- (TeX-parse-macro symbol (cdr-safe (assoc symbol (TeX-symbol-list))))
- (run-hooks 'TeX-after-insert-macro-hook))
+ (atomic-change-group
+ (TeX-parse-macro symbol (cdr-safe (assoc symbol (TeX-symbol-list))))
+ (run-hooks 'TeX-after-insert-macro-hook)))
(defvar TeX-electric-macro-map
(let ((map (make-sparse-keymap)))
@@ -6304,7 +6308,7 @@ available from ")
(insert " if your
installation is older than the one available from the web site.
-If the bug is triggered by a specific \(La\)TeX file, you should try
+If the bug is triggered by a specific (La)TeX file, you should try
to produce a minimal sample file showing the problem and include it
in your report.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- main d22387d0 216/257: Merge remote-tracking branch 'origin/master' into externals/auctex,
Tassilo Horn <=