emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] elpa f23fbd6 14/23: Fill environment content onley when auto-fill


From: Tassilo Horn
Subject: [elpa] elpa f23fbd6 14/23: Fill environment content onley when auto-fill-mode is active
Date: Wed, 30 Mar 2016 19:08:03 +0000

branch: elpa
commit f23fbd66c507b18c4210561406fa5d2facefa26b
Author: Mosè Giordano <address@hidden>
Commit: Mosè Giordano <address@hidden>

    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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]