[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. b1e4d46fce02ded77c509
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. b1e4d46fce02ded77c5091b641fe370ee9d5cf61 |
Date: |
Mon, 01 Jun 2015 15:05:14 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".
The branch, master has been updated
via b1e4d46fce02ded77c5091b641fe370ee9d5cf61 (commit)
from 752171a84a2626e6ecb1578947284a910b6b93da (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b1e4d46fce02ded77c5091b641fe370ee9d5cf61
Author: Tassilo Horn <address@hidden>
Date: Mon Jun 1 17:04:17 2015 +0200
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.
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)
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 ++++++++
latex.el | 9 ++++++++-
2 files changed, 16 insertions(+), 1 deletions(-)
hooks/post-receive
--
GNU AUCTeX
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [AUCTeX-diffs] GNU AUCTeX branch, master, updated. b1e4d46fce02ded77c5091b641fe370ee9d5cf61,
Tassilo Horn <=