[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 6a31d4e79ecc6f8921a60
From: |
Arash Esbati |
Subject: |
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 6a31d4e79ecc6f8921a60f268751efae9f9da4f4 |
Date: |
Fri, 25 Nov 2016 10:12:44 +0000 (UTC) |
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 6a31d4e79ecc6f8921a60f268751efae9f9da4f4 (commit)
via c5d1d02443095721e292e5b383b3db73fb2a1624 (commit)
from c073d3e3e04832a2c178ef5f5b52f0d4935a5ea2 (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 6a31d4e79ecc6f8921a60f268751efae9f9da4f4
Author: Arash Esbati <address@hidden>
Date: Fri Nov 25 11:11:00 2016 +0100
Support new floats defined with newfloat package
* style/caption.el (LaTeX-caption-update-key-val-options): Append
new floating environments defined with "newfloat.sty" as values to
"type*?" keys in `LaTeX-caption-key-val-options-local'.
diff --git a/style/caption.el b/style/caption.el
index a9fdec4..d8699fa 100644
--- a/style/caption.el
+++ b/style/caption.el
@@ -176,12 +176,25 @@ in `caption'-completions."
(when (and (string-equal key "labelformat")
(boundp 'LaTeX-subcaption-key-val-options))
(pushnew (list "subrefformat"
- (delete-dups (apply 'append (list val)
val-match)))
+ (delete-dups (apply #'append (list val)
val-match)))
opts :test #'equal))
- (pushnew (list key (delete-dups (apply 'append (list val)
val-match)))
+ (pushnew (list key (delete-dups (apply #'append (list val)
val-match)))
opts :test #'equal))
(pushnew (list key (list val)) opts :test #'equal)))
- (setq LaTeX-caption-key-val-options-local (copy-alist opts)))))
+ (setq LaTeX-caption-key-val-options-local (copy-alist opts))))
+ ;; Support for environments defined with newfloat.sty: These
+ ;; environments are added to "type" and "type*" key:
+ (when (and (member "newfloat" (TeX-style-list))
+ (fboundp 'LaTeX-newfloat-DeclareFloatingEnvironment-list)
+ (LaTeX-newfloat-DeclareFloatingEnvironment-list))
+ (dolist (key '("type" "type*"))
+ (let* ((val (mapcar #'car
(LaTeX-newfloat-DeclareFloatingEnvironment-list)))
+ (val-match (cdr (assoc key LaTeX-caption-key-val-options-local)))
+ (temp (copy-alist LaTeX-caption-key-val-options-local))
+ (opts (assq-delete-all (car (assoc key temp)) temp)))
+ (pushnew (list key (delete-dups (apply #'append val val-match)))
+ opts :test #'equal)
+ (setq LaTeX-caption-key-val-options-local (copy-alist opts))))))
(defun LaTeX-arg-caption-command (optional &optional prompt)
"Insert caption-commands from `caption.sty'. If OPTIONAL,
commit c5d1d02443095721e292e5b383b3db73fb2a1624
Author: Arash Esbati <address@hidden>
Date: Fri Nov 25 11:04:30 2016 +0100
Append entry to `LaTeX-label-alist' for new "verbatim" floats
* style/newfloat.el (LaTeX-newfloat-auto-cleanup): Append an entry
for parsed environments of "verbatim" type to `LaTeX-label-alist'.
diff --git a/style/newfloat.el b/style/newfloat.el
index e84fad7..166eff5 100644
--- a/style/newfloat.el
+++ b/style/newfloat.el
@@ -119,6 +119,7 @@ If `caption.el' is loaded, add the new floating environment
to
(LaTeX-add-environments flt)
(add-to-list (make-local-variable 'LaTeX-indent-environment-list)
`(,flt current-indentation) t)
+ (add-to-list 'LaTeX-label-alist `(,flt . "lst:") t)
(when (fboundp 'reftex-add-label-environments)
(reftex-add-label-environments
`((,flt ?l "lst:" "~\\ref{%s}" caption nil nil)))))
-----------------------------------------------------------------------
Summary of changes:
style/caption.el | 19 ++++++++++++++++---
style/newfloat.el | 1 +
2 files changed, 17 insertions(+), 3 deletions(-)
hooks/post-receive
--
GNU AUCTeX
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 6a31d4e79ecc6f8921a60f268751efae9f9da4f4,
Arash Esbati <=