Backport commit 7ddd08bd3 from Emacs

* lisp/org-table.el (org-table-range-regexp):
Omit or rewrite useless repetitions that risk being very slow in
the backtracking regexp engine in Emacs.

Omit/rewrite useless regexp repetitions
7ddd08bd3ebc48998062a7d29274cf080256a48f
Paul Eggert
Fri Apr 12 19:43:41 2019 -0700
This commit is contained in:
Paul Eggert 2019-04-12 19:43:16 -07:00 committed by Kyle Meyer
parent 222408d70a
commit 9bf1bdaf25
1 changed files with 2 additions and 2 deletions

View File

@ -489,8 +489,8 @@ Line numbers are counted from the beginning of the table. This
variable is initialized with `org-table-analyze'.")
(defconst org-table-range-regexp
"@\\([-+]?I*[-+]?[0-9]*\\)?\\(\\$[-+]?[0-9]+\\)?\\(\\.\\.@?\\([-+]?I*[-+]?[0-9]*\\)?\\(\\$[-+]?[0-9]+\\)?\\)?"
;; 1 2 3 4 5
"@\\([-+]?I*[-+]?[0-9]*\\)\\(\\$[-+]?[0-9]+\\)?\\(\\.\\.@?\\([-+]?I*[-+]?[0-9]*\\)\\(\\$[-+]?[0-9]+\\)?\\)?"
;; 1 2 3 4 5
"Regular expression for matching ranges in formulas.")
(defconst org-table-range-regexp2