[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-devel] [elpa] externals/auctex d4059b8 02/69: Improve line wrap
From: |
Tassilo Horn |
Subject: |
[AUCTeX-devel] [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))) '(?
?\()))
- (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
- [AUCTeX-devel] [elpa] externals/auctex updated (0a99c11 -> f1abcf8), Tassilo Horn, 2016/03/26
- [AUCTeX-devel] [elpa] externals/auctex 836e461 03/69: Don't use TRIM arg of split-string., Tassilo Horn, 2016/03/26
- [AUCTeX-devel] [elpa] externals/auctex c34bf64 07/69: Merge branch 'master' into simplify-TeX-parse-error, Tassilo Horn, 2016/03/26
- [AUCTeX-devel] [elpa] externals/auctex 056d8c8 50/69: Fix TeX-check-files, Tassilo Horn, 2016/03/26
- [AUCTeX-devel] [elpa] externals/auctex e4cad1c 46/69: Add support for Atril viewer, Tassilo Horn, 2016/03/26
- [AUCTeX-devel] [elpa] externals/auctex 188e4b1 66/69: Temporarily bind gc-cons-threshold in time-consuming task, Tassilo Horn, 2016/03/26
- [AUCTeX-devel] [elpa] externals/auctex d4059b8 02/69: Improve line wrap removal heuristics.,
Tassilo Horn <=
- [AUCTeX-devel] [elpa] externals/auctex f1bcbe3 54/69: Improve LaTeX-warnings-regexp, Tassilo Horn, 2016/03/26
- [AUCTeX-devel] [elpa] externals/auctex 0731fff 10/69: Merge branch 'master' into simplify-TeX-parse-error, Tassilo Horn, 2016/03/26
- [AUCTeX-devel] [elpa] externals/auctex 8926369 06/69: Improve new-file regex., Tassilo Horn, 2016/03/26
- [AUCTeX-devel] [elpa] externals/auctex f7d0535 34/69: Fix file name regexp in TeX-documentation-texdoc, Tassilo Horn, 2016/03/26
- [AUCTeX-devel] [elpa] externals/auctex c09c405 48/69: Fix wrong usage of `TeX-auto-prepare-hook', Tassilo Horn, 2016/03/26
- [AUCTeX-devel] [elpa] externals/auctex 7d4bfac 18/69: Merge branch 'master' into simplify-TeX-parse-error, Tassilo Horn, 2016/03/26
- [AUCTeX-devel] [elpa] externals/auctex 2cca33f 42/69: Minor fix in TeX-documentation-texdoc, Tassilo Horn, 2016/03/26
- [AUCTeX-devel] [elpa] externals/auctex a1473f7 33/69: Capture warnings from packages with hyphens in name, Tassilo Horn, 2016/03/26
- [AUCTeX-devel] [elpa] externals/auctex 4837aba 26/69: Merge branch 'master' into simplify-TeX-parse-error, Tassilo Horn, 2016/03/26
- [AUCTeX-devel] [elpa] externals/auctex 2c21439 41/69: Improve parsing of certain warnings, Tassilo Horn, 2016/03/26