[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex b59075b 06/36: Do not insert a new line if \labe
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex b59075b 06/36: Do not insert a new line if \label is omitted |
Date: |
Thu, 22 Dec 2016 13:08:11 +0000 (UTC) |
branch: externals/auctex
commit b59075b4b6c1db93372b1a6f74e50a564ba2d18e
Author: Arash Esbati <address@hidden>
Commit: Arash Esbati <address@hidden>
Do not insert a new line if \label is omitted
* style/subcaption.el (LaTeX-arg-subcaption-subcaption): Insert a
new line only if \label is given.
---
style/subcaption.el | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/style/subcaption.el b/style/subcaption.el
index 7a116c2..fc5fc63 100644
--- a/style/subcaption.el
+++ b/style/subcaption.el
@@ -60,9 +60,13 @@ caption, insert only a caption."
;; Fill the \subcaption paragraph before inserting the \label:
(LaTeX-fill-paragraph)
(unless star
- (LaTeX-newline)
- (indent-according-to-mode)
- (LaTeX-label currenv 'environment))))
+ (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)))))
(defun LaTeX-arg-subcaption-subcaptionbox (optional &optional star)
"Query for the arguments of \"\\subcaptionbox\" incl. a label and insert
them.
- [elpa] externals/auctex updated (1b5875c -> 2e7ca50), Tassilo Horn, 2016/12/22
- [elpa] externals/auctex b59075b 06/36: Do not insert a new line if \label is omitted,
Tassilo Horn <=
- [elpa] externals/auctex cb6bc11 07/36: Add support for style/bicaption.el to style/caption.el, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex c5d1d02 13/36: Append entry to `LaTeX-label-alist' for new "verbatim" floats, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex c265fc9 02/36: Add new style/FiraMono.el, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex 2f75f51 17/36: Add support for LaTeX core command \textsubscript, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex 6ec185e 16/36: Do not spell-check arguments of \LTXtable, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex 94db238 05/36: Improve caption and label insertion in style/caption.el, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex eb748ea 18/36: Fix query for defined colors in style/ntheorem.el, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex 8a14439 11/36: Add style file for subfiles package., Tassilo Horn, 2016/12/22
- [elpa] externals/auctex d6890e8 04/36: Improve caption and label insertion in style/subcaption.el, Tassilo Horn, 2016/12/22
- [elpa] externals/auctex 42dd1f1 22/36: Support RefTeX with `reftex-add-index-macros' in style/splitidx.el, Tassilo Horn, 2016/12/22