diff options
| author | Alan Mackenzie | 2019-03-03 20:03:56 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2019-03-03 20:03:56 +0000 |
| commit | 81ae21792b3d840a2f11e4c3a682e1e30799c37f (patch) | |
| tree | 3fc18aff722136ab95473328e13bf29b6feff7c0 | |
| parent | db3b3b350658e31c2668f2a14072d6ada9e2ae7c (diff) | |
| download | emacs-81ae21792b3d840a2f11e4c3a682e1e30799c37f.tar.gz emacs-81ae21792b3d840a2f11e4c3a682e1e30799c37f.zip | |
Correct some slightly incorrect regular expressions:
* lisp/progmodes/cc-awk.el (c-awk-harmless-char-re)
(c-awk-harmless-line-char-re, c-awk-_-harmless-nonws-char-re): [...\\\\...]
-> [...\\...].
* lisp/progmodes/cc-engine.el (c-literal-limits): "*/" -> "\\*/".
* lisp/progmodes/cc-mode.el (c-after-change-re-mark-unbalanced-strings):
"\\\r" -> "\r".
| -rw-r--r-- | lisp/progmodes/cc-awk.el | 6 | ||||
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 2 | ||||
| -rw-r--r-- | lisp/progmodes/cc-mode.el | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el index bcb9d0430a3..70b1237cb8d 100644 --- a/lisp/progmodes/cc-awk.el +++ b/lisp/progmodes/cc-awk.el | |||
| @@ -130,7 +130,7 @@ | |||
| 130 | ;; REGEXPS FOR "HARMLESS" STRINGS/LINES. | 130 | ;; REGEXPS FOR "HARMLESS" STRINGS/LINES. |
| 131 | (defconst c-awk-harmless-_ "_\\([^\"]\\|\\'\\)") | 131 | (defconst c-awk-harmless-_ "_\\([^\"]\\|\\'\\)") |
| 132 | ;; Matches an underline NOT followed by ". | 132 | ;; Matches an underline NOT followed by ". |
| 133 | (defconst c-awk-harmless-char-re "[^_#/\"{}();\\\\\n\r]") | 133 | (defconst c-awk-harmless-char-re "[^_#/\"{}();\\\n\r]") |
| 134 | ;; Matches any character not significant in the state machine applying | 134 | ;; Matches any character not significant in the state machine applying |
| 135 | ;; syntax-table properties to "s and /s. | 135 | ;; syntax-table properties to "s and /s. |
| 136 | (defconst c-awk-harmless-string*-re | 136 | (defconst c-awk-harmless-string*-re |
| @@ -141,7 +141,7 @@ | |||
| 141 | (concat "\\=" c-awk-harmless-string*-re)) | 141 | (concat "\\=" c-awk-harmless-string*-re)) |
| 142 | ;; Matches the (possibly empty) sequence of "insignificant" chars at point. | 142 | ;; Matches the (possibly empty) sequence of "insignificant" chars at point. |
| 143 | 143 | ||
| 144 | (defconst c-awk-harmless-line-char-re "[^_#/\"\\\\\n\r]") | 144 | (defconst c-awk-harmless-line-char-re "[^_#/\"\\\n\r]") |
| 145 | ;; Matches any character but a _, #, /, ", \, or newline. N.B. _" starts a | 145 | ;; Matches any character but a _, #, /, ", \, or newline. N.B. _" starts a |
| 146 | ;; localization string in gawk 3.1 | 146 | ;; localization string in gawk 3.1 |
| 147 | (defconst c-awk-harmless-line-string*-re | 147 | (defconst c-awk-harmless-line-string*-re |
| @@ -250,7 +250,7 @@ | |||
| 250 | ;; which can precede an expression. | 250 | ;; which can precede an expression. |
| 251 | 251 | ||
| 252 | ;; REGEXPS USED FOR FINDING THE POSITION OF A "virtual semicolon" | 252 | ;; REGEXPS USED FOR FINDING THE POSITION OF A "virtual semicolon" |
| 253 | (defconst c-awk-_-harmless-nonws-char-re "[^#/\"\\\\\n\r \t]") | 253 | (defconst c-awk-_-harmless-nonws-char-re "[^#/\"\\\n\r \t]") |
| 254 | (defconst c-awk-non-/-syn-ws*-re | 254 | (defconst c-awk-non-/-syn-ws*-re |
| 255 | (concat | 255 | (concat |
| 256 | "\\(" c-awk-escaped-nls*-with-space* | 256 | "\\(" c-awk-escaped-nls*-with-space* |
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 27ce3029c4a..301d07c9c9c 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -5118,7 +5118,7 @@ comment at the start of cc-engine.el for more info." | |||
| 5118 | (setq beg (c-safe (c-backward-sexp 1) (point)))) | 5118 | (setq beg (c-safe (c-backward-sexp 1) (point)))) |
| 5119 | 5119 | ||
| 5120 | ((and (c-safe (forward-char -2) t) | 5120 | ((and (c-safe (forward-char -2) t) |
| 5121 | (looking-at "*/")) | 5121 | (looking-at "\\*/")) |
| 5122 | ;; Block comment. Due to the nature of line | 5122 | ;; Block comment. Due to the nature of line |
| 5123 | ;; comments, they will always be covered by the | 5123 | ;; comments, they will always be covered by the |
| 5124 | ;; normal case above. | 5124 | ;; normal case above. |
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 6718813b79c..1b527094caa 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el | |||
| @@ -1349,7 +1349,7 @@ Note that the style variables are always made local to the buffer." | |||
| 1349 | ;; We're at the start of a string. | 1349 | ;; We're at the start of a string. |
| 1350 | (memq (char-before) c-string-delims))) | 1350 | (memq (char-before) c-string-delims))) |
| 1351 | (if (c-unescaped-nls-in-string-p (1- (point))) | 1351 | (if (c-unescaped-nls-in-string-p (1- (point))) |
| 1352 | (looking-at "\\(\\\\\\(.\\|\n|\\\r\\)\\|[^\"]\\)*") | 1352 | (looking-at "\\(\\\\\\(.\\|\n|\r\\)\\|[^\"]\\)*") |
| 1353 | (looking-at (cdr (assq (char-before) c-string-innards-re-alist)))) | 1353 | (looking-at (cdr (assq (char-before) c-string-innards-re-alist)))) |
| 1354 | (cond | 1354 | (cond |
| 1355 | ((memq (char-after (match-end 0)) '(?\n ?\r)) | 1355 | ((memq (char-after (match-end 0)) '(?\n ?\r)) |