aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2019-03-10 23:08:37 -0700
committerPaul Eggert2019-03-10 23:11:21 -0700
commite81c44fdb4110a1e5af97669c1a7ef8277528b6c (patch)
tree42520d445baebffae83eae85391f9e3ebd56d6cb
parente2f35443796d423ea5f96a99da425a927327deb2 (diff)
downloademacs-e81c44fdb4110a1e5af97669c1a7ef8277528b6c.tar.gz
emacs-e81c44fdb4110a1e5af97669c1a7ef8277528b6c.zip
More regexp corrections and tweaks
Problems reported by Mattias EngdegÄrd in: https://lists.gnu.org/r/emacs-devel/2019-03/msg00247.html * lisp/align.el (align-rules-list): * lisp/comint.el (comint-output-filter): * lisp/language/china-util.el (encode-hz-region): * lisp/progmodes/cperl-mode.el (cperl-indent-exp): * lisp/progmodes/idlwave.el (idlwave-is-pointer-dereference): * lisp/progmodes/scheme.el (dsssl-font-lock-keywords): * lisp/textmodes/texinfmt.el (texinfo-accent-commands): * test/src/regex-emacs-tests.el (regex-tests-re-even-escapes): Fix some regular-expression typos.
-rw-r--r--lisp/align.el2
-rw-r--r--lisp/comint.el2
-rw-r--r--lisp/language/china-util.el2
-rw-r--r--lisp/progmodes/cperl-mode.el2
-rw-r--r--lisp/progmodes/idlwave.el2
-rw-r--r--lisp/progmodes/scheme.el2
-rw-r--r--lisp/textmodes/texinfmt.el8
-rw-r--r--test/src/regex-emacs-tests.el2
8 files changed, 8 insertions, 14 deletions
diff --git a/lisp/align.el b/lisp/align.el
index 43918811b9a..594d15eee15 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -399,7 +399,7 @@ The possible settings for `align-region-separate' are:
399 (lambda (end reverse) 399 (lambda (end reverse)
400 (funcall (if reverse 're-search-backward 400 (funcall (if reverse 're-search-backward
401 're-search-forward) 401 're-search-forward)
402 (concat "[^ \t\n\\\\]" 402 (concat "[^ \t\n\\]"
403 (regexp-quote comment-start) 403 (regexp-quote comment-start)
404 "\\(.+\\)$") end t)))) 404 "\\(.+\\)$") end t))))
405 (modes . align-open-comment-modes)) 405 (modes . align-open-comment-modes))
diff --git a/lisp/comint.el b/lisp/comint.el
index a5fca7ea2a1..e5012be982b 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -2081,7 +2081,7 @@ Make backspaces delete the previous character."
2081 (prompt-re (concat "\\`" (regexp-quote prompt)))) 2081 (prompt-re (concat "\\`" (regexp-quote prompt))))
2082 (while (string-match prompt-re string) 2082 (while (string-match prompt-re string)
2083 (setq string (substring string (match-end 0))))))) 2083 (setq string (substring string (match-end 0)))))))
2084 (while (string-match (concat "\\(^" comint-prompt-regexp 2084 (while (string-match (concat "\\(" comint-prompt-regexp
2085 "\\)\\1+") 2085 "\\)\\1+")
2086 string) 2086 string)
2087 (setq string (replace-match "\\1" nil nil string))) 2087 (setq string (replace-match "\\1" nil nil string)))
diff --git a/lisp/language/china-util.el b/lisp/language/china-util.el
index 70710bac18a..16385651335 100644
--- a/lisp/language/china-util.el
+++ b/lisp/language/china-util.el
@@ -168,7 +168,7 @@ Return the length of resulting text."
168 ;; ESC ESC -> ESC 168 ;; ESC ESC -> ESC
169 (delete-char 1) 169 (delete-char 1)
170 (forward-char -1) 170 (forward-char -1)
171 (if (looking-at iso2022-gb-designation) 171 (if (looking-at "\e\\$A")
172 (progn 172 (progn
173 (delete-region (match-beginning 0) (match-end 0)) 173 (delete-region (match-beginning 0) (match-end 0))
174 (insert hz-gb-designation) 174 (insert hz-gb-designation)
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index a9402e17a92..970c5669c6c 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -4924,7 +4924,7 @@ conditional/loop constructs."
4924 (if (looking-at "\\(state\\|my\\|local\\|our\\)\\>") 4924 (if (looking-at "\\(state\\|my\\|local\\|our\\)\\>")
4925 (forward-sexp -1)))) 4925 (forward-sexp -1))))
4926 (if (looking-at 4926 (if (looking-at
4927 (concat "\\(\\elsif\\|if\\|unless\\|while\\|until" 4927 (concat "\\(elsif\\|if\\|unless\\|while\\|until"
4928 "\\|for\\(each\\)?\\>\\(\\(" 4928 "\\|for\\(each\\)?\\>\\(\\("
4929 cperl-maybe-white-and-comment-rex 4929 cperl-maybe-white-and-comment-rex
4930 "\\(state\\|my\\|local\\|our\\)\\)?" 4930 "\\(state\\|my\\|local\\|our\\)\\)?"
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index 25bc788ffc4..5ff22571b90 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -3690,7 +3690,7 @@ constants - a double quote followed by an octal digit."
3690 (save-excursion 3690 (save-excursion
3691 (forward-char) 3691 (forward-char)
3692 (re-search-backward (concat "\\(" idlwave-idl-keywords 3692 (re-search-backward (concat "\\(" idlwave-idl-keywords
3693 "\\|[[(*+-/=,^><]\\)\\s-*\\*") limit t)))) 3693 "\\|[-[(*+/=,^><]\\)\\s-*\\*") limit t))))
3694 3694
3695 3695
3696;; Statement templates 3696;; Statement templates
diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el
index 62f521ee94a..507a4c7085d 100644
--- a/lisp/progmodes/scheme.el
+++ b/lisp/progmodes/scheme.el
@@ -433,7 +433,7 @@ that variable's value is a string."
433 ;; (make-regexp '("case" "cond" "else" "if" "lambda" 433 ;; (make-regexp '("case" "cond" "else" "if" "lambda"
434 ;; "let" "let*" "letrec" "and" "or" "map" "with-mode")) 434 ;; "let" "let*" "letrec" "and" "or" "map" "with-mode"))
435 "and\\|c\\(ase\\|ond\\)\\|else\\|if\\|" 435 "and\\|c\\(ase\\|ond\\)\\|else\\|if\\|"
436 "l\\(ambda\\|et\\(\\|*\\|rec\\)\\)\\|map\\|or\\|with-mode" 436 "l\\(ambda\\|et\\(\\|\\*\\|rec\\)\\)\\|map\\|or\\|with-mode"
437 "\\)\\>") 437 "\\)\\>")
438 1) 438 1)
439 ;; DSSSL syntax 439 ;; DSSSL syntax
diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el
index 61c31a511c1..4bfecb48b65 100644
--- a/lisp/textmodes/texinfmt.el
+++ b/lisp/textmodes/texinfmt.el
@@ -552,13 +552,7 @@ if large. You can use `Info-split' to do this manually."
552 552
553(defvar texinfo-accent-commands 553(defvar texinfo-accent-commands
554 (concat 554 (concat
555 "@^\\|" 555 "@[\"',=^`~]\\|"
556 "@`\\|"
557 "@'\\|"
558 "@\"\\|"
559 "@,\\|"
560 "@=\\|"
561 "@~\\|"
562 "@OE{\\|" 556 "@OE{\\|"
563 "@oe{\\|" 557 "@oe{\\|"
564 "@AA{\\|" 558 "@AA{\\|"
diff --git a/test/src/regex-emacs-tests.el b/test/src/regex-emacs-tests.el
index 9a403165734..0ae50c94d4c 100644
--- a/test/src/regex-emacs-tests.el
+++ b/test/src/regex-emacs-tests.el
@@ -278,7 +278,7 @@ on success"
278 278
279 279
280(defconst regex-tests-re-even-escapes 280(defconst regex-tests-re-even-escapes
281 "\\(?:^\\|[^\\\\]\\)\\(?:\\\\\\\\\\)*" 281 "\\(?:^\\|[^\\]\\)\\(?:\\\\\\\\\\)*"
282 "Regex that matches an even number of \\ characters") 282 "Regex that matches an even number of \\ characters")
283 283
284(defconst regex-tests-re-odd-escapes 284(defconst regex-tests-re-odd-escapes