diff options
| author | Paul Eggert | 2019-12-04 16:53:39 -0800 |
|---|---|---|
| committer | Paul Eggert | 2019-12-04 16:54:24 -0800 |
| commit | ab612302b4917fec5846922f3d8ffafa673c0d36 (patch) | |
| tree | 378749424198f449cf9251c558733fa23a212df1 | |
| parent | 4472b053c3003a34803ec3ce5816caadec7b607a (diff) | |
| download | emacs-ab612302b4917fec5846922f3d8ffafa673c0d36.tar.gz emacs-ab612302b4917fec5846922f3d8ffafa673c0d36.zip | |
Fix regex repetition of repetitions
Problems reported by Mattias EngdegÄrd in:
https://lists.gnu.org/r/emacs-devel/2019-12/msg00066.html
* lisp/gnus/gnus-util.el (gnus-emacs-version):
* lisp/mail/rfc2368.el (rfc2368-mailto-regexp):
* lisp/net/tramp-sh.el (tramp-sh-inotifywait-process-filter):
* lisp/obsolete/terminal.el (te-parse-program-and-args):
* lisp/org/org-table.el (org-table-wrap-region):
* lisp/progmodes/verilog-mode.el (verilog-inject-inst):
Avoid repetition-of-repetition in regexp.
| -rw-r--r-- | lisp/gnus/gnus-util.el | 2 | ||||
| -rw-r--r-- | lisp/mail/rfc2368.el | 2 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 2 | ||||
| -rw-r--r-- | lisp/obsolete/terminal.el | 2 | ||||
| -rw-r--r-- | lisp/org/org-table.el | 2 | ||||
| -rw-r--r-- | lisp/progmodes/verilog-mode.el | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 8e390473aa8..42021d30730 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el | |||
| @@ -1574,7 +1574,7 @@ sequence, this is like `mapcar'. With several, it is like the Common Lisp | |||
| 1574 | (cond | 1574 | (cond |
| 1575 | ((not (memq 'emacs lst)) | 1575 | ((not (memq 'emacs lst)) |
| 1576 | nil) | 1576 | nil) |
| 1577 | ((string-match "^\\(\\([.0-9]+\\)*\\)\\.[0-9]+$" emacs-version) | 1577 | ((string-match "^[.0-9]*\\.[0-9]+$" emacs-version) |
| 1578 | (concat "Emacs/" emacs-version | 1578 | (concat "Emacs/" emacs-version |
| 1579 | (if system-v | 1579 | (if system-v |
| 1580 | (concat " (" system-v ")") | 1580 | (concat " (" system-v ")") |
diff --git a/lisp/mail/rfc2368.el b/lisp/mail/rfc2368.el index 05f27e4d998..b658ffab587 100644 --- a/lisp/mail/rfc2368.el +++ b/lisp/mail/rfc2368.el | |||
| @@ -61,7 +61,7 @@ | |||
| 61 | ;; only an approximation? | 61 | ;; only an approximation? |
| 62 | ;; see rfc 1738 | 62 | ;; see rfc 1738 |
| 63 | (defconst rfc2368-mailto-regexp | 63 | (defconst rfc2368-mailto-regexp |
| 64 | "^\\(mailto:\\)\\([^?]+\\)*\\(\\?\\(.*\\)\\)*" | 64 | "^\\(mailto:\\)\\([^?]+\\)?\\(\\?\\(.*\\)\\)*" |
| 65 | "Regular expression to match and aid in parsing a mailto url.") | 65 | "Regular expression to match and aid in parsing a mailto url.") |
| 66 | 66 | ||
| 67 | ;; describes 'mailto:' | 67 | ;; describes 'mailto:' |
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 59a93a839e0..2aef6ea10fb 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -3799,7 +3799,7 @@ Fall back to normal file name handler if no Tramp handler exists." | |||
| 3799 | (unless (string-match | 3799 | (unless (string-match |
| 3800 | (eval-when-compile | 3800 | (eval-when-compile |
| 3801 | (concat "^[^[:blank:]]+" | 3801 | (concat "^[^[:blank:]]+" |
| 3802 | "[[:blank:]]+\\([^[:blank:]]+\\)+" | 3802 | "[[:blank:]]+\\([^[:blank:]]+\\)" |
| 3803 | "\\([[:blank:]]+\\([^\n\r]+\\)\\)?")) | 3803 | "\\([[:blank:]]+\\([^\n\r]+\\)\\)?")) |
| 3804 | line) | 3804 | line) |
| 3805 | (tramp-error proc 'file-notify-error "%s" line)) | 3805 | (tramp-error proc 'file-notify-error "%s" line)) |
diff --git a/lisp/obsolete/terminal.el b/lisp/obsolete/terminal.el index ce6f2309fd3..c12d225beff 100644 --- a/lisp/obsolete/terminal.el +++ b/lisp/obsolete/terminal.el | |||
| @@ -1166,7 +1166,7 @@ subprocess started." | |||
| 1166 | (let ((l ()) (p 0)) | 1166 | (let ((l ()) (p 0)) |
| 1167 | (while p | 1167 | (while p |
| 1168 | (setq l (cons (if (string-match | 1168 | (setq l (cons (if (string-match |
| 1169 | "\\([-a-zA-Z0-9+=_.@/:]+\\)\\([ \t]+\\)*" | 1169 | "\\([-a-zA-Z0-9+=_.@/:]+\\)[ \t]*" |
| 1170 | s p) | 1170 | s p) |
| 1171 | (prog1 (substring s p (match-end 1)) | 1171 | (prog1 (substring s p (match-end 1)) |
| 1172 | (setq p (match-end 0)) | 1172 | (setq p (match-end 0)) |
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index a21587acbe0..5f42db50688 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el | |||
| @@ -4642,7 +4642,7 @@ blank, and the content is appended to the field above." | |||
| 4642 | (skip-chars-backward " ") | 4642 | (skip-chars-backward " ") |
| 4643 | (insert " " (org-trim s)) | 4643 | (insert " " (org-trim s)) |
| 4644 | (org-table-align))) | 4644 | (org-table-align))) |
| 4645 | ((looking-at "\\([^|]+\\)+|") ; Split field. | 4645 | ((looking-at "\\([^|]+\\)|") ; Split field. |
| 4646 | (let ((s (match-string 1))) | 4646 | (let ((s (match-string 1))) |
| 4647 | (replace-match " |") | 4647 | (replace-match " |") |
| 4648 | (goto-char (match-beginning 0)) | 4648 | (goto-char (match-beginning 0)) |
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index 0afbdc3dd18..6ec8d995c15 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el | |||
| @@ -10973,7 +10973,7 @@ shown) will make this into: | |||
| 10973 | (t | 10973 | (t |
| 10974 | ;; Delete identical interconnect | 10974 | ;; Delete identical interconnect |
| 10975 | (let ((case-fold-search nil)) ; So we don't convert upper-to-lower, etc | 10975 | (let ((case-fold-search nil)) ; So we don't convert upper-to-lower, etc |
| 10976 | (while (verilog-re-search-forward-quick "\\.\\s *\\([a-zA-Z0-9`_$]+\\)*\\s *(\\s *\\1\\s *)\\s *" end-pt t) | 10976 | (while (verilog-re-search-forward-quick "\\.\\s *\\([a-zA-Z0-9`_$]+\\)?\\s *(\\s *\\1\\s *)\\s *" end-pt t) |
| 10977 | (delete-region (match-beginning 0) (match-end 0)) | 10977 | (delete-region (match-beginning 0) (match-end 0)) |
| 10978 | (setq end-pt (- end-pt (- (match-end 0) (match-beginning 0)))) ; Keep it correct | 10978 | (setq end-pt (- end-pt (- (match-end 0) (match-beginning 0)))) ; Keep it correct |
| 10979 | (while (or (looking-at "[ \t\n\f,]+") | 10979 | (while (or (looking-at "[ \t\n\f,]+") |