(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)
|
||||
(while (string-match "\\(\\`\\|[^\\]\\)\\\\\\(\\\\\\\\\\)*([^?]"
|
||||
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)))
|
||||
|
||||
;;; Workhorse functions.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue