aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2001-11-28 03:06:10 +0000
committerStefan Monnier2001-11-28 03:06:10 +0000
commit3ccfa82a6c4193d9058ed5d1e7c09f9735bf770b (patch)
treed71dcf1faa8591c0e65691ff9cf4d91da7deb84d
parentd28981c94dc697a963aa7c3ae4b3511483a49d3a (diff)
downloademacs-3ccfa82a6c4193d9058ed5d1e7c09f9735bf770b.tar.gz
emacs-3ccfa82a6c4193d9058ed5d1e7c09f9735bf770b.zip
(regexp-opt-depth): Fix off-by-two error.
-rw-r--r--lisp/emacs-lisp/regexp-opt.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el
index b6fac1355c1..894cc4c4be7 100644
--- a/lisp/emacs-lisp/regexp-opt.el
+++ b/lisp/emacs-lisp/regexp-opt.el
@@ -120,7 +120,9 @@ in REGEXP."
120 (let ((count 0) start) 120 (let ((count 0) start)
121 (while (string-match "\\(\\`\\|[^\\]\\)\\\\\\(\\\\\\\\\\)*([^?]" 121 (while (string-match "\\(\\`\\|[^\\]\\)\\\\\\(\\\\\\\\\\)*([^?]"
122 regexp start) 122 regexp start)
123 (setq count (1+ count) start (match-end 0))) 123 (setq count (1+ count)
124 ;; Go back 2 chars (one for [^?] and one for [^\\]).
125 start (- (match-end 0) 2))
124 count))) 126 count)))
125 127
126;;; Workhorse functions. 128;;; Workhorse functions.