[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex e85968c 66/78: Support caption.el and some other
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex e85968c 66/78: Support caption.el and some other fixes. |
Date: |
Mon, 19 Oct 2015 09:11:13 +0000 |
branch: externals/auctex
commit e85968c22de15113c1c778b1bcc546f6ae376a49
Author: Arash Esbati <address@hidden>
Commit: Mosè Giordano <address@hidden>
Support caption.el and some other fixes.
* style/newfloat.el (LaTeX-newfloat-auto-cleanup): Check if
`LaTeX-caption-supported-float-types' from caption.el is bound and
update it accordingly. Fix docstring.
("newfloat"): Fix wrong check with (LaTeX-largest-level).
("newfloat"): Use `LaTeX-newfloat-key-val-options-local' and
delete redundant code.
Signed-off-by: Mosè Giordano <address@hidden>
---
ChangeLog | 9 +++++++++
style/newfloat.el | 25 +++++++++++--------------
2 files changed, 20 insertions(+), 14 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0f9b067..61de4d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2015-10-05 Arash Esbati <address@hidden>
+
+ * style/newfloat.el (LaTeX-newfloat-auto-cleanup): Check if
+ `LaTeX-caption-supported-float-types' from caption.el is bound and
+ update it accordingly. Fix docstring.
+ ("newfloat"): Fix wrong check with (LaTeX-largest-level).
+ ("newfloat"): Use `LaTeX-newfloat-key-val-options-local' and
+ delete redundant code.
+
2015-10-04 Mos� Giordano <address@hidden>
* context.el (ConTeXt-Mark-version): New customizable and
diff --git a/style/newfloat.el b/style/newfloat.el
index 48cee5e..4cde32e 100644
--- a/style/newfloat.el
+++ b/style/newfloat.el
@@ -87,7 +87,7 @@
(defun LaTeX-newfloat-auto-prepare ()
"Clear `LaTeX-auto-newfloat-DeclareFloatingEnvironment' before parsing."
- (setq LaTeX-auto-newfloat-DeclareFloatingEnvironment nil))
+ (setq LaTeX-auto-newfloat-DeclareFloatingEnvironment nil))
(defun LaTeX-newfloat-auto-cleanup ()
"Process definded floats with \\DeclareFloatingEnvironment.
@@ -97,7 +97,9 @@ AUCTeX (\"figure\", \"table\" or \"verbatim\"), update
loaded, add the new floating environment via
`reftex-add-label-environments'. For \"verbatim\" environments,
update `LaTeX-indent-environment-list' to suppress indentation.
-Also define the macros \"listofENVs\" and \"listofENVes\"."
+If `caption.el' is loaded, add the new floating environment to
+`LaTeX-caption-supported-float-types'. Also define the macros
+\"listofENVs\" and \"listofENVes\"."
(dolist (flt-type (LaTeX-newfloat-DeclareFloatingEnvironment-list))
(let ((flt (car flt-type))
(type (cadr flt-type)))
@@ -122,6 +124,9 @@ Also define the macros \"listofENVs\" and \"listofENVes\"."
`((,flt ?l "lst:" "~\\ref{%s}" caption nil nil)))))
(t
(LaTeX-add-environments flt)))
+ (when (boundp 'LaTeX-caption-supported-float-types)
+ (add-to-list (make-local-variable 'LaTeX-caption-supported-float-types)
+ flt))
(if (string-equal "e" (substring flt -1))
(TeX-add-symbols (concat "listof" flt "s"))
(TeX-add-symbols
@@ -144,7 +149,7 @@ Also define the macros \"listofENVs\" and \"listofENVes\"."
(setq LaTeX-newfloat-key-val-options-local
(copy-alist LaTeX-newfloat-key-val-options))
- (if (= (LaTeX-largest-level) 1)
+ (if (< (LaTeX-largest-level) 2)
(add-to-list 'LaTeX-newfloat-key-val-options-local
'("within" ("chapter" "section" "none")))
(add-to-list 'LaTeX-newfloat-key-val-options-local
@@ -165,15 +170,7 @@ Also define the macros \"listofENVs\" and \"listofENVes\"."
(TeX-arg-eval completing-read
(TeX-argument-prompt nil nil "Floating environment")
(mapcar 'car
(LaTeX-newfloat-DeclareFloatingEnvironment-list)))
- (TeX-arg-eval
- (lambda ()
- (let ((keyvals (TeX-read-key-val
- nil
- (append (if (= (LaTeX-largest-level) 1)
- '(("within" ("chapter" "section" "none")))
- '(("within" ("section" "none"))))
- LaTeX-newfloat-key-val-options))))
- (format "%s" keyvals)))))
+ (TeX-arg-key-val LaTeX-newfloat-key-val-options-local))
'("ForEachFloatingEnvironment" t)
'("ForEachFloatingEnvironment*" t)
@@ -190,7 +187,7 @@ Also define the macros \"listofENVs\" and \"listofENVes\"."
(let ((keyvals (TeX-read-key-val
nil
(append '(("chapterlistsgap"))
- (if (= (LaTeX-largest-level) 1)
+ (if (< (LaTeX-largest-level) 2)
'(("within" ("chapter" "section" "none")))
'(("within" ("section" "none"))))))))
(format "%s" keyvals))))))
@@ -212,7 +209,7 @@ Also define the macros \"listofENVs\" and \"listofENVes\"."
t
(append
'(("chapterlistsgap"))
- (if (= (LaTeX-largest-level) 1)
+ (if (< (LaTeX-largest-level) 2)
'(("within" ("chapter" "section" "none")))
'(("within" ("section" "none")))))))
- [elpa] externals/auctex 5dd4f21 35/78: Style file for polyglossia package., (continued)
- [elpa] externals/auctex 5dd4f21 35/78: Style file for polyglossia package., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 4810753 41/78: Add new style Alegreya.el., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 2b648fe 38/78: Remove one TODO in style/polyglossia.el., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 22c7d9f 27/78: Implement "run-all" for regions and sections, Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 6b3cbea 32/78: Suggest to run Index when appropriate., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex a76afdf 49/78: Add abstract env only to classes defining it., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex a864241 55/78: Fixup space-before-tab git warned about., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 9b5827c 44/78: Fix typo in error message., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 3bb1cbe 56/78: Add font-latex specific prettify-symbols-compose-predicate, Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 8a2bd0b 68/78: Fix previous commit., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex e85968c 66/78: Support caption.el and some other fixes.,
Tassilo Horn <=
- [elpa] externals/auctex cac89e9 63/78: Start supporting ConTeXt Mark IV., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex ac8d479 69/78: Support newfloat.el., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 320de59 53/78: Apply some fixes to caption.el., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex ce8981a 64/78: Fontify math environment, Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 0c4e740 62/78: Fix typo in comment., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 3b5f047 67/78: Add supporto to ConTeXt Mark IV in some sentinels., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 4a12225 72/78: Use `LaTeX-add-counters' on "LTchunksize"., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 1f116b8 74/78: Fill $...$ like \(...\) (bug#21645), Tassilo Horn, 2015/10/19
- [elpa] externals/auctex 93d50ea 75/78: Do not disable PDF when using pstricks with XeTeX., Tassilo Horn, 2015/10/19
- [elpa] externals/auctex f9a7928 59/78: Add new style newfloat.el., Tassilo Horn, 2015/10/19