[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 5f67eac 50/71: Fix logic again
From: |
Tassilo Horn |
Subject: |
[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-*\\*\\)?"
- [elpa] externals/auctex 4e15656 19/71: Cleanup indentation of verbatim environments, (continued)
- [elpa] externals/auctex 4e15656 19/71: Cleanup indentation of verbatim environments, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex 2af20f4 27/71: ; Silence TeX warnings, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex ec9362d 16/71: ; * doc/todo.texi (Mid-term Goals): Fix spacing., Tassilo Horn, 2021/12/17
- [elpa] externals/auctex c457aab 35/71: * style/babel.el ("babel"): Use `LaTeX-fontspec-font-features'., Tassilo Horn, 2021/12/17
- [elpa] externals/auctex bc5f7bc 60/71: Add new style/cancel.el, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex fa309c9 02/71: Fix error when tex.el is loaded while default-directory doesn't exist, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex f72f849 15/71: Delete obsolete files and targets, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex 16bcc8d 21/71: ; * tex.el (TeX-source-correlate-mode): Quote function name by #'., Tassilo Horn, 2021/12/17
- [elpa] externals/auctex 3684fde 17/71: Explain how to support option completion, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex 0752650 44/71: Don't use obsolete @inforef, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex 5f67eac 50/71: Fix logic again,
Tassilo Horn <=
- [elpa] externals/auctex dfd3369 59/71: Add new style/xr.el, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex e118a53 64/71: ; Prepare for upcoming release, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex db45d9e 41/71: Improve handling of key=vals in style/mdframed.el, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex accfe51 58/71: Add new style/xr-hyper.el, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex 2ee9a07 71/71: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex 9284ac6 22/71: Explain how to do forward search by mouse, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex 363b778 56/71: Update style/multicol.el to package version 1.9b, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex 22e4415 68/71: Add styles for packages from sttools collection, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex b866110 31/71: Autoload `TeX-check-engine-add-engines' in tex.el, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex 0322057 55/71: Fix misc minor issues, Tassilo Horn, 2021/12/17