[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master a332034160: CC Mode: Fix looping in patch from yesterday
From: |
Alan Mackenzie |
Subject: |
master a332034160: CC Mode: Fix looping in patch from yesterday |
Date: |
Sun, 7 Aug 2022 08:27:22 -0400 (EDT) |
branch: master
commit a332034160bf8e1f38039cd2d37898de6f94508f
Author: Alan Mackenzie <acm@muc.de>
Commit: Alan Mackenzie <acm@muc.de>
CC Mode: Fix looping in patch from yesterday
* lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings)
(c-after-change-mark-abnormal-strings): Check (eobp) in loops advancing over
escaped newlines.
---
lisp/progmodes/cc-mode.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index ca4df2d1c7..027fd8f42f 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -1520,7 +1520,9 @@ Note that the style variables are always made local to
the buffer."
;; was before unescaping a NL.)
(while
(progn (end-of-line)
- (eq (char-before) ?\\))
+ (and
+ (eq (char-before) ?\\)
+ (not (eobp))))
(forward-line))
;; We're at an EOLL or point-max.
(if (equal (c-get-char-property (point) 'syntax-table) '(15))
@@ -1641,7 +1643,9 @@ Note that the style variables are always made local to
the buffer."
end))
(while
(progn (end-of-line)
- (eq (char-before) ?\\))
+ (and
+ (eq (char-before) ?\\)
+ (not (eobp))))
(forward-line))
(point))
c-new-END))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master a332034160: CC Mode: Fix looping in patch from yesterday,
Alan Mackenzie <=