diff options
author | Stefan Monnier <[email protected]> | 2000-05-10 22:43:28 +0000 |
---|---|---|
committer | Stefan Monnier <[email protected]> | 2000-05-10 22:43:28 +0000 |
commit | ac5cb26d90238cc01056928a99f086cfb188dae5 (patch) | |
tree | 2f560d78ee2d4387dd4386fe88fc12ca82eddb5a /lisp/emacs-lisp/regexp-opt.el | |
parent | 8947a5e23255b77ff0dae73675d3a2e77122c066 (diff) |
(regexp-opt-depth): Fix regexp.
Diffstat (limited to 'lisp/emacs-lisp/regexp-opt.el')
-rw-r--r-- | lisp/emacs-lisp/regexp-opt.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el index 8c77e9ea5c..a7ff7b54a5 100644 --- a/lisp/emacs-lisp/regexp-opt.el +++ b/lisp/emacs-lisp/regexp-opt.el @@ -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))) |