diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2000-05-10 22:43:28 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2000-05-10 22:43:28 +0000 |
commit | ac5cb26d90238cc01056928a99f086cfb188dae5 (patch) | |
tree | 2f560d78ee2d4387dd4386fe88fc12ca82eddb5a /lisp/emacs-lisp | |
parent | 8947a5e23255b77ff0dae73675d3a2e77122c066 (diff) | |
download | emacs-ac5cb26d90238cc01056928a99f086cfb188dae5.tar.gz emacs-ac5cb26d90238cc01056928a99f086cfb188dae5.tar.bz2 emacs-ac5cb26d90238cc01056928a99f086cfb188dae5.zip |
(regexp-opt-depth): Fix regexp.
Diffstat (limited to 'lisp/emacs-lisp')
-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 8c77e9ea5cb..a7ff7b54a58 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))) |