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

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

[elpa] externals/auctex 39badf0 15/35: New defcustom LaTeX-fill-excluded


From: Tassilo Horn
Subject: [elpa] externals/auctex 39badf0 15/35: New defcustom LaTeX-fill-excluded-macros
Date: Sun, 22 Mar 2015 09:27:01 +0000

branch: externals/auctex
commit 39badf048916c309437f37dbfb5c9d6ba5bf4801
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>

    New defcustom LaTeX-fill-excluded-macros
    
    * latex.el (LaTeX-fill-excluded-macros): New defcustom for
    excluding macro arguments from filling.
    (LaTeX-fill-region-as-paragraph): Use it.
---
 ChangeLog |    6 ++++++
 latex.el  |    7 +++++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e81c6bb..de66ef6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-03-03  Tassilo Horn  <address@hidden>
+
+       * latex.el (LaTeX-fill-excluded-macros): New defcustom for
+       excluding macro arguments from filling.
+       (LaTeX-fill-region-as-paragraph): Use it.
+
 2015-03-02  Tassilo Horn  <address@hidden>
 
        * font-latex.el (font-latex-match-command-with-arguments): Fix
diff --git a/latex.el b/latex.el
index 9c2646f..fc5ebdb 100644
--- a/latex.el
+++ b/latex.el
@@ -3353,6 +3353,12 @@ does not fit into the line."
   :group 'LaTeX
   :type 'boolean)
 
+(defcustom LaTeX-fill-excluded-macros nil
+  "List of macro names (without leading \\) whose arguments must
+not be subject to filling."
+  :group 'LaTeX
+  :type '(repeat string))
+
 (defvar LaTeX-nospace-between-char-regexp
   (if (featurep 'xemacs)
     (if (and (boundp 'word-across-newline) word-across-newline)
@@ -3379,6 +3385,7 @@ pass args FROM, TO and JUSTIFY-FLAG."
   (interactive "*r\nP")
   (let ((end-marker (save-excursion (goto-char to) (point-marker))))
     (if (or (assoc (LaTeX-current-environment) LaTeX-indent-environment-list)
+           (member (TeX-current-macro) LaTeX-fill-excluded-macros)
            ;; This could be generalized, if there are more cases where
            ;; a special string at the start of a region to fill should
            ;; inhibit filling.



reply via email to

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