changeset 28864:71337b429a49

(regexp-opt-depth): Fix regexp.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 10 May 2000 22:41:28 +0000
parents 6430ce03c28a
children 5743b3652f72
files lisp/emacs-lisp/regexp-opt.el
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/regexp-opt.el	Wed May 10 22:40:17 2000 +0000
+++ b/lisp/emacs-lisp/regexp-opt.el	Wed May 10 22:41:28 2000 +0000
@@ -112,7 +112,8 @@
     (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)))