[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex b1e4d46 06/28: Consider args with \newenvironmen
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex b1e4d46 06/28: Consider args with \newenvironment with opt arg |
Date: |
Fri, 07 Aug 2015 15:59:17 +0000 |
branch: externals/auctex
commit b1e4d46fce02ded77c5091b641fe370ee9d5cf61
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>
Consider args with \newenvironment with opt arg
* latex.el (LaTeX-auto-env-args-with-opt): New variable for
collecting environments with an optional argument.
(LaTeX-auto-regexp-list): Use it.
(LaTeX-auto-cleanup): Initialize \newenvironment{foo}[n][d]{}{}
with the n-1 remaining mandatory arguments.
---
ChangeLog | 8 ++++++++
latex.el | 9 ++++++++-
2 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 03f529a..3d570c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2015-06-01 Tassilo Horn <address@hidden>
+
+ * latex.el (LaTeX-auto-env-args-with-opt): New variable for
+ collecting environments with an optional argument.
+ (LaTeX-auto-regexp-list): Use it.
+ (LaTeX-auto-cleanup): Initialize \newenvironment{foo}[n][d]{}{}
+ with the n-1 remaining mandatory arguments.
+
2015-05-29 Nicolas Richard <address@hidden>
* latex.el (LaTeX-backward-paragraph): Make it work in narrowed
diff --git a/latex.el b/latex.el
index 3ba66c8..b869c5e 100644
--- a/latex.el
+++ b/latex.el
@@ -1370,6 +1370,7 @@ right number."
(defvar LaTeX-auto-arguments nil)
(defvar LaTeX-auto-optional nil)
(defvar LaTeX-auto-env-args nil)
+(defvar LaTeX-auto-env-args-with-opt nil)
(TeX-auto-add-type "label" "LaTeX")
(TeX-auto-add-type "bibitem" "LaTeX")
@@ -1463,7 +1464,7 @@ This is necessary since index entries may contain
commands and stuff.")
(,(concat "\\\\\\(?:new\\|provide\\)command\\*?{?\\\\\\(" token
"+\\)}?")
1 TeX-auto-symbol)
(,(concat "\\\\newenvironment\\*?{?\\(" token
"+\\)}?\\[\\([0-9]+\\)\\]\\[")
- 1 LaTeX-auto-environment)
+ (1 2) LaTeX-auto-env-args-with-opt)
(,(concat "\\\\newenvironment\\*?{?\\(" token
"+\\)}?\\[\\([0-9]+\\)\\]")
(1 2) LaTeX-auto-env-args)
(,(concat "\\\\newenvironment\\*?{?\\(" token "+\\)}?")
@@ -1690,6 +1691,12 @@ The value is actually the tail of the list of options
given to PACKAGE."
(list (nth 0 entry)
(string-to-number (nth 1 entry)))))
LaTeX-auto-env-args)
+ ;; Ditto for environments with optional args
+ (mapc (lambda (entry)
+ (add-to-list 'LaTeX-auto-environment
+ (list (nth 0 entry)
+ (1- (string-to-number (nth 1 entry))))))
+ LaTeX-auto-env-args-with-opt)
;; Cleanup use of def to add environments
;; NOTE: This uses an O(N^2) algorithm, while an O(N log N)
- [elpa] externals/auctex updated (5f45de1 -> 1fc2c7a), Tassilo Horn, 2015/08/07
- [elpa] externals/auctex 11d759d 02/28: More font-lock fix for verbatim environment args., Tassilo Horn, 2015/08/07
- [elpa] externals/auctex 4e84c98 04/28: Add subtitle to slide-title class, Tassilo Horn, 2015/08/07
- [elpa] externals/auctex 0a1742f 01/28: Parse env's defined with `\lstnewenvironment'., Tassilo Horn, 2015/08/07
- [elpa] externals/auctex 752171a 05/28: Fix bug in LaTeX-backward-paragraph in narrowed buffers, Tassilo Horn, 2015/08/07
- [elpa] externals/auctex 0e3f3ac 03/28: New styles newpxtext.el and newpxmath.el., Tassilo Horn, 2015/08/07
- [elpa] externals/auctex b1e4d46 06/28: Consider args with \newenvironment with opt arg,
Tassilo Horn <=
- [elpa] externals/auctex 0b85713 07/28: Query for optional env arg, Tassilo Horn, 2015/08/07
- [elpa] externals/auctex 1341b2c 09/28: Query for optional env arg defined with \lstnewenvironment., Tassilo Horn, 2015/08/07
- [elpa] externals/auctex 7a0d85f 10/28: New style pdfpages.el., Tassilo Horn, 2015/08/07
- [elpa] externals/auctex 3cd3e72 08/28: Restore Emacs 22 compatibility, Tassilo Horn, 2015/08/07
- [elpa] externals/auctex 8426ca5 12/28: Missing ConTeXt-(un)numbered-section-list-nl variables., Tassilo Horn, 2015/08/07
- [elpa] externals/auctex 0efe678 14/28: Improve completion of includepdf macro., Tassilo Horn, 2015/08/07
- [elpa] externals/auctex 8052cd5 13/28: Find warnings emitted by a package with digits in its name., Tassilo Horn, 2015/08/07
- [elpa] externals/auctex 24a2a9d 20/28: Add `LCRJ' to `LaTeX-array-column-letters'., Tassilo Horn, 2015/08/07
- [elpa] externals/auctex b9eddc9 11/28: Really ignore dbus errors, Tassilo Horn, 2015/08/07
- [elpa] externals/auctex 1202f83 19/28: Add `X' to `LaTeX-array-column-letters'., Tassilo Horn, 2015/08/07