[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] [elpa] externals/auctex a21c10a 29/34: Check for `auto-fi
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] [elpa] externals/auctex a21c10a 29/34: Check for `auto-fill-function' before filling |
Date: |
Sun, 6 Jun 2021 11:40:06 -0400 (EDT) |
branch: externals/auctex
commit a21c10a076734b710145df5950459351025b8723
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
Check for `auto-fill-function' before filling
* style/algorithm.el (LaTeX-env-algorithm):
* style/beamer.el ("beamer"):
* style/bicaption.el (LaTeX-arg-bicaption-bicaption):
* style/caption.el (LaTeX-arg-caption-captionbox)
(LaTeX-arg-caption-captionof):
* style/currvita.el (LaTeX-currvita-env-with-label):
* style/enumitem.el (LaTeX-enumitem-env-with-opts):
* style/longtable.el (LaTeX-env-longtable):
* style/moodle.el (LaTeX-moodle-question-env-with-args):
* style/subcaption.el (LaTeX-arg-subcaption-subcaption)
(LaTeX-arg-subcaption-subcaptionbox):
* style/tcolorboxlib-raster.el (LaTeX-tcolorbox-lib-raster-env-item):
* style/xltabular.el (LaTeX-env-xltabular): Fill the paragraph if
`auto-fill-function' is non-nil.
---
style/algorithm.el | 2 +-
style/beamer.el | 5 +++--
style/bicaption.el | 4 ++--
style/caption.el | 4 ++--
style/currvita.el | 3 ++-
style/enumitem.el | 3 ++-
style/longtable.el | 2 +-
style/moodle.el | 5 +++--
style/subcaption.el | 4 ++--
style/tcolorboxlib-raster.el | 3 ++-
style/xltabular.el | 2 +-
11 files changed, 21 insertions(+), 16 deletions(-)
diff --git a/style/algorithm.el b/style/algorithm.el
index e18e19d..8500f44 100644
--- a/style/algorithm.el
+++ b/style/algorithm.el
@@ -59,7 +59,7 @@
;; Add } to close `\caption{'
(insert TeX-grcl)
;; fill the caption
- (LaTeX-fill-paragraph)
+ (when auto-fill-function (LaTeX-fill-paragraph))
;; Insert a new line and indent
(LaTeX-newline)
(indent-according-to-mode)
diff --git a/style/beamer.el b/style/beamer.el
index 942d807..36f15d7 100644
--- a/style/beamer.el
+++ b/style/beamer.el
@@ -155,8 +155,9 @@
(insert (format "\\frametitle{%s}" title))
;; This works because \frametitle is a
;; paragraph command.
- (backward-char)
- (LaTeX-fill-paragraph))))))
+ (when auto-fill-function
+ (backward-char)
+ (LaTeX-fill-paragraph)))))))
'("onlyenv" (lambda (env &rest ignore)
(LaTeX-insert-environment
env
diff --git a/style/bicaption.el b/style/bicaption.el
index b8d6cb7..245b454 100644
--- a/style/bicaption.el
+++ b/style/bicaption.el
@@ -106,7 +106,7 @@ arguments."
(when (and label-inside (not star))
(LaTeX-label currenv 'environment))
(insert TeX-grcl)
- (LaTeX-fill-paragraph)
+ (when auto-fill-function (LaTeX-fill-paragraph))
(LaTeX-newline)
(indent-according-to-mode)
;; Insert short & regular 2. caption
@@ -131,7 +131,7 @@ arguments."
""))))
(and width (TeX-argument-insert width t))
(and inpos (TeX-argument-insert inpos t))))
- (LaTeX-fill-paragraph)
+ (when auto-fill-function (LaTeX-fill-paragraph))
;; Insert label -- a new line is inserted only if label is there:
(when (and (not label-inside) (not star)
(save-excursion (LaTeX-label currenv 'environment)))
diff --git a/style/caption.el b/style/caption.el
index 346b84d..988a9bb 100644
--- a/style/caption.el
+++ b/style/caption.el
@@ -287,7 +287,7 @@ caption, insert only a caption."
;; `LaTeX-fill-paragraph' without messing up the code since
;; \caption starts a new paragraph with AUCTeX
;; (cf. `paragraph-start').
- (LaTeX-fill-paragraph))
+ (when auto-fill-function (LaTeX-fill-paragraph)))
(defun LaTeX-arg-caption-captionof (optional &optional star)
"Query for the arguments of \"\\captionof\" macro and insert them.
@@ -311,7 +311,7 @@ STAR is non-nil, do not query for a short-caption and a
label."
(when (and short-caption (not (string= short-caption "")))
(insert LaTeX-optop short-caption LaTeX-optcl))
(TeX-argument-insert caption optional)
- (LaTeX-fill-paragraph)
+ (when auto-fill-function (LaTeX-fill-paragraph))
(when (and (not star)
;; Check if `envtype' is a figure or a table, also
;; consult `LaTeX-label-alist' for additions from user
diff --git a/style/currvita.el b/style/currvita.el
index 03a099a..62aa51f 100644
--- a/style/currvita.el
+++ b/style/currvita.el
@@ -58,7 +58,8 @@
(LaTeX-insert-item)
;; The inserted \item may have outdented the first line to the
;; right. Fill it, if appropriate.
- (when (and (not (looking-at "$"))
+ (when (and auto-fill-function
+ (not (looking-at "$"))
(not (assoc env LaTeX-indent-environment-list))
(> (- (line-end-position) (line-beginning-position))
(current-fill-column)))
diff --git a/style/enumitem.el b/style/enumitem.el
index efb8aa3..1a858b1 100644
--- a/style/enumitem.el
+++ b/style/enumitem.el
@@ -246,7 +246,8 @@ key-val and the first item."
(LaTeX-insert-item)
;; The inserted \item may have outdented the first line to the
;; right. Fill it, if appropriate.
- (when (and (not (looking-at "$"))
+ (when (and auto-fill-function
+ (not (looking-at "$"))
(not (assoc env LaTeX-indent-environment-list))
(> (- (line-end-position) (line-beginning-position))
(current-fill-column)))
diff --git a/style/longtable.el b/style/longtable.el
index 4e7ea30..2646e33 100644
--- a/style/longtable.el
+++ b/style/longtable.el
@@ -83,7 +83,7 @@ insert line break macro."
;; close `\caption{'
(insert TeX-grcl "\\\\")
;; fill the caption
- (LaTeX-fill-paragraph)
+ (when auto-fill-function (LaTeX-fill-paragraph))
;; Insert a new line and indent
(LaTeX-newline)
(indent-according-to-mode))
diff --git a/style/moodle.el b/style/moodle.el
index b61310e..ac5f286 100644
--- a/style/moodle.el
+++ b/style/moodle.el
@@ -129,11 +129,12 @@
(newline)
(indent-according-to-mode)
(insert qtext)
- (LaTeX-fill-paragraph)))
+ (when auto-fill-function (LaTeX-fill-paragraph))))
(LaTeX-insert-item)
;; The inserted \item may have outdented the first line to the
;; right. Fill it, if appropriate.
- (when (and (not (looking-at "$"))
+ (when (and auto-fill-function
+ (not (looking-at "$"))
(not (assoc env LaTeX-indent-environment-list))
(> (- (line-end-position) (line-beginning-position))
(current-fill-column)))
diff --git a/style/subcaption.el b/style/subcaption.el
index 370a5dc..5f3122f 100644
--- a/style/subcaption.el
+++ b/style/subcaption.el
@@ -69,7 +69,7 @@ caption, insert only a caption."
(insert LaTeX-optop short-caption LaTeX-optcl))
(insert TeX-grop caption TeX-grcl)
;; Fill the \subcaption paragraph before inserting the \label:
- (LaTeX-fill-paragraph)
+ (when auto-fill-function (LaTeX-fill-paragraph))
(when (and (not star)
(save-excursion (LaTeX-label currenv 'environment)))
;; Move \label into next line if we have one:
@@ -109,7 +109,7 @@ caption, insert only a caption."
;; Fill the paragraph before inserting {}. We use this function
;; since we add \subcaption to `paragraph-start' in the style hook
;; below.
- (LaTeX-fill-paragraph))
+ (when auto-fill-function (LaTeX-fill-paragraph)))
(TeX-add-style-hook
"subcaption"
diff --git a/style/tcolorboxlib-raster.el b/style/tcolorboxlib-raster.el
index bcb93d0..912f3c2 100644
--- a/style/tcolorboxlib-raster.el
+++ b/style/tcolorboxlib-raster.el
@@ -119,7 +119,8 @@
(LaTeX-insert-item)
;; The inserted \item may have outdented the first line to the
;; right. Fill it, if appropriate.
- (when (and (not (looking-at "$"))
+ (when (and auto-fill-function
+ (not (looking-at "$"))
(not (assoc environment LaTeX-indent-environment-list))
(> (- (line-end-position) (line-beginning-position))
(current-fill-column)))
diff --git a/style/xltabular.el b/style/xltabular.el
index 72c46df..09c5a97 100644
--- a/style/xltabular.el
+++ b/style/xltabular.el
@@ -79,7 +79,7 @@ nested curly brace pair nor escaped \"}\".")
;; close `\caption{'
(insert TeX-grcl "\\\\")
;; fill the caption
- (LaTeX-fill-paragraph)
+ (when auto-fill-function (LaTeX-fill-paragraph))
;; Insert a new line and indent
(LaTeX-newline)
(indent-according-to-mode))
- [AUCTeX-diffs] [elpa] externals/auctex b5f34a9 23/34: Followup my commit on May 6, (continued)
- [AUCTeX-diffs] [elpa] externals/auctex b5f34a9 23/34: Followup my commit on May 6, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex bff3d85 01/34: ; Delete unnecessary escaping of characters, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 7ff3323 03/34: Add support for (Brazilian) Portuguese, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 2a4cbbb 21/34: Improve `TeX-electric-macro' in Texinfo mode, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex dfd6585 33/34: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 605cfc2 14/34: Add new test, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex bb1bb25 27/34: Remove backspace as paragraph separator, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 93d66d1 31/34: Adapt for Texinfo mode, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 154fc6e 28/34: Only re-fill \item contents if auto-fill-mode is active (bug#48760), Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex cd63c11 32/34: Use own error description for LaTeX mode only, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex a21c10a 29/34: Check for `auto-fill-function' before filling,
Tassilo Horn <=
- [AUCTeX-diffs] [elpa] externals/auctex 34ab611 22/34: Improve completion, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex e7b25d1 26/34: Use #' rather than ' to quote function names, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 1d32138 25/34: ; Silence the compiler, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 81ce0ee 19/34: Add -dDELAYBIND only when necessary, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex c540e3a 30/34: Define minor modes using keywords, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex b0c5a4e 20/34: Delete style/latexinfo.el from AUCTeX, Tassilo Horn, 2021/06/06
- [AUCTeX-diffs] [elpa] externals/auctex 6c32b97 34/34: Release GNU AUCTeX 13.0.12, Tassilo Horn, 2021/06/06