mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-10 00:00:39 -08:00
(regexp-opt-depth): Fix regexp.
This commit is contained in:
parent
8947a5e232
commit
ac5cb26d90
2 changed files with 41 additions and 1 deletions
|
|
@ -112,7 +112,8 @@ in REGEXP."
|
|||
(string-match regexp "")
|
||||
;; Count the number of open parentheses in REGEXP.
|
||||
(let ((count 0) start)
|
||||
(while (string-match "\\\\\\(\\\\\\\\\\)*([^?]" regexp start)
|
||||
(while (string-match "\\(\\`\\|[^\\]\\)\\\\\\(\\\\\\\\\\)*([^?]"
|
||||
regexp start)
|
||||
(setq count (1+ count) start (match-end 0)))
|
||||
count)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue