branch: elpa
commit f23fbd66c507b18c4210561406fa5d2facefa26b
Author: Mosè Giordano <[email protected]>
Commit: Mosè Giordano <[email protected]>
Fill environment content onley when auto-fill-mode is active
* latex.el (LaTeX-insert-environment): Fill only when
`auto-fill-function' is non-nil, that means auto-fill-mode is active.
Reported by Florian Lindner.
---
latex.el | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/latex.el b/latex.el
index c0b0baf..9c2ccb5 100644
--- a/latex.el
+++ b/latex.el
@@ -720,7 +720,9 @@ environment just inserted, the buffer position just before
(if active-mark
(progn
(or (assoc environment LaTeX-indent-environment-list)
- (LaTeX-fill-region content-start (line-beginning-position 2)))
+ (if auto-fill-function
+ ;; Fill the region only when `auto-fill-mode' is active.
+ (LaTeX-fill-region content-start (line-beginning-position
2))))
(set-mark content-start))
(indent-according-to-mode))
(save-excursion (beginning-of-line 2) (indent-according-to-mode))