aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias EngdegÄrd2019-04-19 22:24:35 +0200
committerMattias EngdegÄrd2019-04-19 22:24:35 +0200
commita59c41ee81568a5e56d7a6545be6d18b37ef2d60 (patch)
tree6611be0a153834b657930191feda3756dae1a574
parent0f8628490e3e06f2bfe14451626f55b2165d711c (diff)
downloademacs-a59c41ee81568a5e56d7a6545be6d18b37ef2d60.tar.gz
emacs-a59c41ee81568a5e56d7a6545be6d18b37ef2d60.zip
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 `.'.
-rw-r--r--lisp/progmodes/cc-mode.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 49268c4482e..fc4ba8f5891 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."
1244 (goto-char (1+ end)) ; might be a newline. 1244 (goto-char (1+ end)) ; might be a newline.
1245 ;; In the following regexp, the initial \n caters for a newline getting 1245 ;; In the following regexp, the initial \n caters for a newline getting
1246 ;; joined to a preceding \ by the removal of what comes between. 1246 ;; joined to a preceding \ by the removal of what comes between.
1247 (re-search-forward "[\n\r]?\\(\\\\\\(.\\|\n\\|\r\\)\\|[^\\\n\r]\\)*" 1247 (re-search-forward "[\n\r]?\\(\\\\\\(.\\|\n\\)\\|[^\\\n\r]\\)*"
1248 nil t) 1248 nil t)
1249 ;; We're at an EOLL or point-max. 1249 ;; We're at an EOLL or point-max.
1250 (setq c-new-END (max c-new-END (min (1+ (point)) (point-max)))) 1250 (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."
1371 (unless (and (c-major-mode-is 'c++-mode) 1371 (unless (and (c-major-mode-is 'c++-mode)
1372 (c-maybe-re-mark-raw-string)) 1372 (c-maybe-re-mark-raw-string))
1373 (if (c-unescaped-nls-in-string-p (1- (point))) 1373 (if (c-unescaped-nls-in-string-p (1- (point)))
1374 (looking-at "\\(\\\\\\(.\\|\n\\|\r\\)\\|[^\"]\\)*") 1374 (looking-at "\\(\\\\\\(.\\|\n\\)\\|[^\"]\\)*")
1375 (looking-at (cdr (assq (char-before) c-string-innards-re-alist)))) 1375 (looking-at (cdr (assq (char-before) c-string-innards-re-alist))))
1376 (cond 1376 (cond
1377 ((memq (char-after (match-end 0)) '(?\n ?\r)) 1377 ((memq (char-after (match-end 0)) '(?\n ?\r))