diff options
Diffstat (limited to 'lisp/progmodes/cc-mode.el')
-rw-r--r-- | lisp/progmodes/cc-mode.el | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 70fc1cb73a9..ca4df2d1c7e 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -1518,7 +1518,10 @@ Note that the style variables are always made local to the buffer." ;; Move to end of logical line (as it will be after the change, or as it ;; was before unescaping a NL.) - (re-search-forward "\\(?:\\\\\\(?:.\\|\n\\)\\|[^\\\n\r]\\)*" nil t) + (while + (progn (end-of-line) + (eq (char-before) ?\\)) + (forward-line)) ;; We're at an EOLL or point-max. (if (equal (c-get-char-property (point) 'syntax-table) '(15)) (if (memq (char-after) '(?\n ?\r)) @@ -1636,8 +1639,10 @@ Note that the style variables are always made local to the buffer." (min (1+ end) ; 1+, if we're inside an escaped NL. (point-max)) end)) - (re-search-forward "\\(?:\\\\\\(?:.\\|\n\\)\\|[^\\\n\r]\\)*" - nil t) + (while + (progn (end-of-line) + (eq (char-before) ?\\)) + (forward-line)) (point)) c-new-END)) s) |