[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 7390999 61/95: ; Simplify insertion of a newline
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 7390999 61/95: ; Simplify insertion of a newline after label |
Date: |
Sun, 16 Apr 2017 01:26:55 -0400 (EDT) |
branch: externals/auctex
commit 7390999883480bc80d2f065b65c896453d9d80c9
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>
; Simplify insertion of a newline after label
* style/caption.el (LaTeX-arg-caption-captionof):
* style/subcaption.el (LaTeX-arg-subcaption-subcaption): Simplify
insertion of a newline after label.
---
style/caption.el | 38 +++++++++++++++++++-------------------
style/subcaption.el | 12 +++++-------
2 files changed, 24 insertions(+), 26 deletions(-)
diff --git a/style/caption.el b/style/caption.el
index ec1d36d..84809b9 100644
--- a/style/caption.el
+++ b/style/caption.el
@@ -293,25 +293,25 @@ STAR is non-nil, do not query for a short-caption and a
label."
(insert LaTeX-optop short-caption LaTeX-optcl))
(TeX-argument-insert caption optional)
(LaTeX-fill-paragraph)
- (unless star
- ;; Check if `envtype' is a figure or a table, also consult
- ;; `LaTeX-label-alist' for additions from user or newfloat.el,
- ;; then run `LaTeX-label' w/ 'environment arg, otherwise w/o.
- (save-excursion
- (if (or (member envtype figtypes)
- (member envtype tabtypes)
- (assoc envtype LaTeX-label-alist))
- (LaTeX-label (cond ((member envtype figtypes)
- "figure")
- ((member envtype tabtypes)
- "table")
- (t envtype))
- 'environment)
- (LaTeX-label envtype)))
- (when (looking-at-p "\\\\label{")
- (LaTeX-newline)
- (indent-according-to-mode)
- (end-of-line)))))
+ (when (and (not star)
+ ;; Check if `envtype' is a figure or a table, also
+ ;; consult `LaTeX-label-alist' for additions from user
+ ;; or newfloat.el, then run `LaTeX-label' w/
+ ;; 'environment arg, otherwise w/o.
+ (save-excursion
+ (if (or (member envtype figtypes)
+ (member envtype tabtypes)
+ (assoc envtype LaTeX-label-alist))
+ (LaTeX-label (cond ((member envtype figtypes)
+ "figure")
+ ((member envtype tabtypes)
+ "table")
+ (t envtype))
+ 'environment)
+ (LaTeX-label envtype))))
+ (LaTeX-newline)
+ (indent-according-to-mode)
+ (end-of-line))))
(TeX-add-style-hook
"caption"
diff --git a/style/subcaption.el b/style/subcaption.el
index 2893041..6c4405a 100644
--- a/style/subcaption.el
+++ b/style/subcaption.el
@@ -59,14 +59,12 @@ caption, insert only a caption."
(insert TeX-grop caption TeX-grcl)
;; Fill the \subcaption paragraph before inserting the \label:
(LaTeX-fill-paragraph)
- (unless star
- (save-excursion
- (LaTeX-label currenv 'environment))
+ (when (and (not star)
+ (save-excursion (LaTeX-label currenv 'environment)))
;; Move \label into next line if we have one:
- (when (looking-at (regexp-quote "\\label{"))
- (LaTeX-newline)
- (indent-according-to-mode)
- (end-of-line)))))
+ (LaTeX-newline)
+ (indent-according-to-mode)
+ (end-of-line))))
(defun LaTeX-arg-subcaption-subcaptionbox (optional &optional star)
"Query for the arguments of \"\\subcaptionbox\" incl. a label and insert
them.
- [elpa] externals/auctex 94b227d 89/95: * doc/auctex.texi (Selecting a Command): Document `TeX-ispell-verb-delimiters'., (continued)
- [elpa] externals/auctex 94b227d 89/95: * doc/auctex.texi (Selecting a Command): Document `TeX-ispell-verb-delimiters'., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 4225941 59/95: Modify `TeX-expand-list-builtin' instead of `TeX-expand-list', Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 79361b5 58/95: Add new style/fvextra.el, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex d0908cb 51/95: Fix auto selection of japanese TeX engine, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex aac8694 67/95: Use compat function `TeX-replace-regexp-in-string' in core files, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 5a84d95 88/95: Fix `paragraph-start' and `paragraph-separate', Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 618bdf1 85/95: Append \b to regexp built from TeX control words, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 0cde29b 87/95: ; * tex-ispell.el (TeX-ispell-verb-delimiters): Remove `*'., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 07a2903 82/95: Don't alter standard value or saved value themselves of customize option, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 194a8f8 62/95: Add LaTeX inline math delimiters to Ispell skip list, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 7390999 61/95: ; Simplify insertion of a newline after label,
Tassilo Horn <=
- [elpa] externals/auctex 6a298a8 47/95: Fix documents and add trivial improvements., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex a286e8b 57/95: Improve parsing capabilities of style/fancyvrb.el, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 11e234b 55/95: Remove spurious entries of view settings., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 83a875b 83/95: ; * tex.el (TeX-ispell-tex-arg-verb-end): Drop unnecessary `format'., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 2116248 94/95: * doc/changes.texi: Update with recent changes., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 65e56e1 93/95: ; Make sure that `regex-opt' builds a shy group., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex e6c95e9 78/95: * tests/latex/fontification-verb-macros.tex: New file., Tassilo Horn, 2017/04/16
- [elpa] externals/auctex a8dba19 60/95: Fix addition of key=val's, Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 4688310 65/95: Add new compat function `TeX-replace-regexp-in-string', Tassilo Horn, 2017/04/16
- [elpa] externals/auctex 6b5a7e0 56/95: Improve fallback for indentation when & is omitted, Tassilo Horn, 2017/04/16