diff options
author | kuanyui <azazabc123@gmail.com> | 2016-01-20 23:24:34 +0800 |
---|---|---|
committer | kuanyui <azazabc123@gmail.com> | 2016-01-20 23:24:34 +0800 |
commit | 81db7359e1a891020ef2e65aa05c2b9e65673254 (patch) | |
tree | 3416765de0a928c65a2668bc9671adf9599b7bac /s.el | |
parent | 99c7431cccf7d21956e18cf262d018b709dd57f6 (diff) |
Fix wrong amount of matched in s-matched-positions-all
;; Old version:
(s-matched-positions-all "=\\(.+?\\)=" "This is a =very= simple =sample=." 1)
;;=> ((11 . 15) (16 . 24) (25 . 31))
;; New version:
(s-matched-positions-all "=\\(.+?\\)=" "This is a =very= simple =sample=." 1)
;; => ((11 . 15) (25 . 31))
Diffstat (limited to 's.el')
-rw-r--r-- | s.el | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -429,7 +429,7 @@ SUBEXP-DEPTH is 0 by default." (< pos (length string))) (let ((m (match-end subexp-depth))) (push (cons (match-beginning subexp-depth) (match-end subexp-depth)) result) - (setq pos m))) + (setq pos (match-end 0)))) (nreverse result))) (defun s-match (regexp s &optional start) |