[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex d4059b8 02/69: Improve line wrap removal heurist
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex d4059b8 02/69: Improve line wrap removal heuristics. |
Date: |
Sat, 26 Mar 2016 21:36:31 +0000 |
branch: externals/auctex
commit d4059b8f49c2609369d694a8250d1df8641161c3
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>
Improve line wrap removal heuristics.
* tex-buf.el (TeX-format-filter): Remove linebreaks at columns 79
and also column 80. Also remove linebreaks preceded by a period
that are followed by a word character to remove linebreaks in file
names that are wrapped just after the period starting the file
name extension.
---
tex-buf.el | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/tex-buf.el b/tex-buf.el
index c2c3ba6..e64c3a2 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1176,15 +1176,17 @@ command."
(goto-char pt)
(insert-before-markers string)
(set-marker (process-mark process) (point))
- ;; Remove line breaks at column 79
+ ;; Remove line breaks at columns 79 and 80
(while (> (point) pt)
(end-of-line 0)
- (when (and (= (- (point) (line-beginning-position)) 79)
- ;; Heuristic: Don't delete the linebreak if the
- ;; next line is empty or starts with an opening
- ;; parenthesis or if point is located after a period.
+ (when (and (memql (- (point) (line-beginning-position)) '(79 80))
+ ;; Heuristic: Don't delete the linebreak if the next line
+ ;; is empty or starts with an opening parenthesis, or if
+ ;; point is located after a period and in the next line no
+ ;; word char follows.
(not (memq (char-after (1+ (point))) '(?\n ?\()))
- (not (eq (char-before) ?.)))
+ (not (and (eq (char-before) ?.)
+ (not (eq ?w (char-syntax (char-after (1+
(point)))))))))
(delete-char 1)))
(goto-char (marker-position (process-mark process)))
;; Determine current page
- [elpa] externals/auctex updated (0a99c11 -> f1abcf8), Tassilo Horn, 2016/03/26
- [elpa] externals/auctex a7f4839 04/69: Fix Wrong type argument: characterp, nil error., Tassilo Horn, 2016/03/26
- [elpa] externals/auctex 836e461 03/69: Don't use TRIM arg of split-string., Tassilo Horn, 2016/03/26
- [elpa] externals/auctex d4059b8 02/69: Improve line wrap removal heuristics.,
Tassilo Horn <=
- [elpa] externals/auctex c34bf64 07/69: Merge branch 'master' into simplify-TeX-parse-error, Tassilo Horn, 2016/03/26
- [elpa] externals/auctex 524b45b 05/69: Merge branch 'master' into simplify-TeX-parse-error, Tassilo Horn, 2016/03/26
- [elpa] externals/auctex 8926369 06/69: Improve new-file regex., Tassilo Horn, 2016/03/26
- [elpa] externals/auctex f919468 01/69: Improve TeX error parsing., Tassilo Horn, 2016/03/26
- [elpa] externals/auctex 0731fff 10/69: Merge branch 'master' into simplify-TeX-parse-error, Tassilo Horn, 2016/03/26
- [elpa] externals/auctex 8cee4a7 12/69: Merge branch 'master' into simplify-TeX-parse-error, Tassilo Horn, 2016/03/26
- [elpa] externals/auctex 95bef06 21/69: Merge branch 'master' into simplify-TeX-parse-error, Tassilo Horn, 2016/03/26
- [elpa] externals/auctex 6f74661 11/69: Merge from master., Tassilo Horn, 2016/03/26
- [elpa] externals/auctex 901b20a 22/69: Merge branch 'master' into simplify-TeX-parse-error, Tassilo Horn, 2016/03/26
- [elpa] externals/auctex f351ed9 24/69: Merge branch 'master' into simplify-TeX-parse-error, Tassilo Horn, 2016/03/26