[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] [elpa] externals/auctex 5f67eac 50/71: Fix logic again
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] [elpa] externals/auctex 5f67eac 50/71: Fix logic again |
Date: |
Fri, 17 Dec 2021 15:00:35 -0500 (EST) |
branch: externals/auctex
commit 5f67eac8d508402349884ba80808ec0f4722f4fb
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>
Fix logic again
* latex.el (LaTeX-fill-region-as-paragraph): When identifying code
comment, continue search if the found candidate turns out not to be a
code comment.
Add a comment for regexp.
---
latex.el | 25 ++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/latex.el b/latex.el
index 132e6a5..e3699c5 100644
--- a/latex.el
+++ b/latex.el
@@ -4022,15 +4022,20 @@ performed in that case."
(goto-char from)
(while (< (point) end-marker)
;; Code comments.
- (when (setq has-code-comment
- (TeX-search-forward-comment-start end-marker))
- ;; See if there is at least one non-whitespace
- ;; character before the comment starts.
- (goto-char has-code-comment)
- (skip-chars-backward " \t" (line-beginning-position))
- (if (bolp)
- ;; Not a code comment.
- (setq has-code-comment nil)))
+ (catch 'found
+ (while (setq has-code-comment
+ (TeX-search-forward-comment-start end-marker))
+ ;; See if there is at least one non-whitespace
+ ;; character before the comment starts.
+ (goto-char has-code-comment)
+ (skip-chars-backward " \t" (line-beginning-position))
+ (if (not (bolp))
+ ;; A real code comment.
+ (throw 'found t)
+ ;; Not a code comment. Continue the loop.
+ (forward-line 1)
+ (if (> (point) end-marker)
+ (goto-char end-marker)))))
;; Go back to the former point for the next regexp search.
(goto-char from)
@@ -4050,6 +4055,8 @@ performed in that case."
"\\(?:{[ \t]*}\\)?[ \t]*$"
"\\)\\|"
;; Lines ending with `\\'.
+ ;; XXX: This matches a line ending with "\\\ ".
+ ;; Should we avoid such corner case?
(regexp-quote (concat TeX-esc TeX-esc))
;; XXX: Why not just "\\s-*\\*?" ?
"\\(?:\\s-*\\*\\)?"
- [AUCTeX-diffs] [elpa] externals/auctex ba1cbd2 53/71: Improve handling of key=vals in style/caption.el, (continued)
- [AUCTeX-diffs] [elpa] externals/auctex ba1cbd2 53/71: Improve handling of key=vals in style/caption.el, Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex f72f849 15/71: Delete obsolete files and targets, Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex 9284ac6 22/71: Explain how to do forward search by mouse, Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex 43f6398 46/71: Improve handling of key=vals in style/enumitem.el, Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex c457aab 35/71: * style/babel.el ("babel"): Use `LaTeX-fontspec-font-features'., Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex dfd3369 59/71: Add new style/xr.el, Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex cd4a1c9 28/71: * style/graphicx.el (LaTeX-graphicx-key-val-options): Add alt key., Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex 0322057 55/71: Fix misc minor issues, Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex ec9362d 16/71: ; * doc/todo.texi (Mid-term Goals): Fix spacing., Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex fa309c9 02/71: Fix error when tex.el is loaded while default-directory doesn't exist, Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex 5f67eac 50/71: Fix logic again,
Tassilo Horn <=
- [AUCTeX-diffs] [elpa] externals/auctex b866110 31/71: Autoload `TeX-check-engine-add-engines' in tex.el, Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex e118a53 64/71: ; Prepare for upcoming release, Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex f6edd15 70/71: Add style/sidecap.el, Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex 6902d05 42/71: Improve handling of key=vals in style/minted.el, Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex fd73414 11/71: ; * doc/changes.texi: Add supplementary notice., Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex 464fd34 20/71: * tests/latex/latex-test.el (LaTeX-flush-left-indent): New test., Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex 16bcc8d 21/71: ; * tex.el (TeX-source-correlate-mode): Quote function name by #'., Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex 2af20f4 27/71: ; Silence TeX warnings, Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex 363b778 56/71: Update style/multicol.el to package version 1.9b, Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex 7fa094f 14/71: ; * style/tabulary.el ("tabulary"): Really append the entry., Tassilo Horn, 2021/12/17