[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master e81c44f: More regexp corrections and tweaks
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master e81c44f: More regexp corrections and tweaks |
Date: |
Mon, 11 Mar 2019 02:11:25 -0400 (EDT) |
branch: master
commit e81c44fdb4110a1e5af97669c1a7ef8277528b6c
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
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.
---
lisp/align.el | 2 +-
lisp/comint.el | 2 +-
lisp/language/china-util.el | 2 +-
lisp/progmodes/cperl-mode.el | 2 +-
lisp/progmodes/idlwave.el | 2 +-
lisp/progmodes/scheme.el | 2 +-
lisp/textmodes/texinfmt.el | 8 +-------
test/src/regex-emacs-tests.el | 2 +-
8 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/lisp/align.el b/lisp/align.el
index 4391881..594d15e 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -399,7 +399,7 @@ The possible settings for `align-region-separate' are:
(lambda (end reverse)
(funcall (if reverse 're-search-backward
're-search-forward)
- (concat "[^ \t\n\\\\]"
+ (concat "[^ \t\n\\]"
(regexp-quote comment-start)
"\\(.+\\)$") end t))))
(modes . align-open-comment-modes))
diff --git a/lisp/comint.el b/lisp/comint.el
index a5fca7e..e5012be 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -2081,7 +2081,7 @@ Make backspaces delete the previous character."
(prompt-re (concat "\\`" (regexp-quote prompt))))
(while (string-match prompt-re string)
(setq string (substring string (match-end 0)))))))
- (while (string-match (concat "\\(^" comint-prompt-regexp
+ (while (string-match (concat "\\(" comint-prompt-regexp
"\\)\\1+")
string)
(setq string (replace-match "\\1" nil nil string)))
diff --git a/lisp/language/china-util.el b/lisp/language/china-util.el
index 70710ba..1638565 100644
--- a/lisp/language/china-util.el
+++ b/lisp/language/china-util.el
@@ -168,7 +168,7 @@ Return the length of resulting text."
;; ESC ESC -> ESC
(delete-char 1)
(forward-char -1)
- (if (looking-at iso2022-gb-designation)
+ (if (looking-at "\e\\$A")
(progn
(delete-region (match-beginning 0) (match-end 0))
(insert hz-gb-designation)
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index a9402e1..970c566 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -4924,7 +4924,7 @@ conditional/loop constructs."
(if (looking-at
"\\(state\\|my\\|local\\|our\\)\\>")
(forward-sexp -1))))
(if (looking-at
- (concat "\\(\\elsif\\|if\\|unless\\|while\\|until"
+ (concat "\\(elsif\\|if\\|unless\\|while\\|until"
"\\|for\\(each\\)?\\>\\(\\("
cperl-maybe-white-and-comment-rex
"\\(state\\|my\\|local\\|our\\)\\)?"
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index 25bc788..5ff2257 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -3690,7 +3690,7 @@ constants - a double quote followed by an octal digit."
(save-excursion
(forward-char)
(re-search-backward (concat "\\(" idlwave-idl-keywords
- "\\|[[(*+-/=,^><]\\)\\s-*\\*") limit t))))
+ "\\|[-[(*+/=,^><]\\)\\s-*\\*") limit t))))
;; Statement templates
diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el
index 62f521e..507a4c7 100644
--- a/lisp/progmodes/scheme.el
+++ b/lisp/progmodes/scheme.el
@@ -433,7 +433,7 @@ that variable's value is a string."
;; (make-regexp '("case" "cond" "else" "if" "lambda"
;; "let" "let*" "letrec" "and" "or" "map" "with-mode"))
"and\\|c\\(ase\\|ond\\)\\|else\\|if\\|"
- "l\\(ambda\\|et\\(\\|*\\|rec\\)\\)\\|map\\|or\\|with-mode"
+ "l\\(ambda\\|et\\(\\|\\*\\|rec\\)\\)\\|map\\|or\\|with-mode"
"\\)\\>")
1)
;; DSSSL syntax
diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el
index 61c31a5..4bfecb4 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."
(defvar texinfo-accent-commands
(concat
- "@^\\|"
- "@`\\|"
- "@'\\|"
- "@\"\\|"
- "@,\\|"
- "@=\\|"
- "@~\\|"
+ "@[\"',=^`~]\\|"
"@OE{\\|"
"@oe{\\|"
"@AA{\\|"
diff --git a/test/src/regex-emacs-tests.el b/test/src/regex-emacs-tests.el
index 9a40316..0ae50c9 100644
--- a/test/src/regex-emacs-tests.el
+++ b/test/src/regex-emacs-tests.el
@@ -278,7 +278,7 @@ on success"
(defconst regex-tests-re-even-escapes
- "\\(?:^\\|[^\\\\]\\)\\(?:\\\\\\\\\\)*"
+ "\\(?:^\\|[^\\]\\)\\(?:\\\\\\\\\\)*"
"Regex that matches an even number of \\ characters")
(defconst regex-tests-re-odd-escapes
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master e81c44f: More regexp corrections and tweaks,
Paul Eggert <=