mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-04 11:00:45 -08:00
(regexp-opt-depth): Fix off-by-two error.
This commit is contained in:
parent
d28981c94d
commit
3ccfa82a6c
1 changed files with 3 additions and 1 deletions
|
|
@ -120,7 +120,9 @@ in REGEXP."
|
||||||
(let ((count 0) start)
|
(let ((count 0) start)
|
||||||
(while (string-match "\\(\\`\\|[^\\]\\)\\\\\\(\\\\\\\\\\)*([^?]"
|
(while (string-match "\\(\\`\\|[^\\]\\)\\\\\\(\\\\\\\\\\)*([^?]"
|
||||||
regexp start)
|
regexp start)
|
||||||
(setq count (1+ count) start (match-end 0)))
|
(setq count (1+ count)
|
||||||
|
;; Go back 2 chars (one for [^?] and one for [^\\]).
|
||||||
|
start (- (match-end 0) 2))
|
||||||
count)))
|
count)))
|
||||||
|
|
||||||
;;; Workhorse functions.
|
;;; Workhorse functions.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue