[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master a59c41e: Remove subsumed regexp branches
From: |
Mattias Engdegård |
Subject: |
[Emacs-diffs] master a59c41e: Remove subsumed regexp branches |
Date: |
Fri, 19 Apr 2019 16:25:25 -0400 (EDT) |
branch: master
commit a59c41ee81568a5e56d7a6545be6d18b37ef2d60
Author: Mattias Engdegård <address@hidden>
Commit: Mattias Engdegård <address@hidden>
Remove subsumed regexp branches
* lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings)
(c-after-change-mark-abnormal-strings): Remove `\r' subsumed by `.'.
---
lisp/progmodes/cc-mode.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 49268c4..fc4ba8f 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -1244,7 +1244,7 @@ Note that the style variables are always made local to
the buffer."
(goto-char (1+ end)) ; might be a newline.
;; In the following regexp, the initial \n caters for a newline getting
;; joined to a preceding \ by the removal of what comes between.
- (re-search-forward "[\n\r]?\\(\\\\\\(.\\|\n\\|\r\\)\\|[^\\\n\r]\\)*"
+ (re-search-forward "[\n\r]?\\(\\\\\\(.\\|\n\\)\\|[^\\\n\r]\\)*"
nil t)
;; We're at an EOLL or point-max.
(setq c-new-END (max c-new-END (min (1+ (point)) (point-max))))
@@ -1371,7 +1371,7 @@ Note that the style variables are always made local to
the buffer."
(unless (and (c-major-mode-is 'c++-mode)
(c-maybe-re-mark-raw-string))
(if (c-unescaped-nls-in-string-p (1- (point)))
- (looking-at "\\(\\\\\\(.\\|\n\\|\r\\)\\|[^\"]\\)*")
+ (looking-at "\\(\\\\\\(.\\|\n\\)\\|[^\"]\\)*")
(looking-at (cdr (assq (char-before) c-string-innards-re-alist))))
(cond
((memq (char-after (match-end 0)) '(?\n ?\r))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master a59c41e: Remove subsumed regexp branches,
Mattias Engdegård <=