summaryrefslogtreecommitdiff
path: root/s.el
diff options
context:
space:
mode:
authorkuanyui <azazabc123@gmail.com>2016-01-20 23:24:34 +0800
committerkuanyui <azazabc123@gmail.com>2016-01-20 23:24:34 +0800
commit81db7359e1a891020ef2e65aa05c2b9e65673254 (patch)
tree3416765de0a928c65a2668bc9671adf9599b7bac /s.el
parent99c7431cccf7d21956e18cf262d018b709dd57f6 (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.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/s.el b/s.el
index 4d85eb4..b022ecc 100644
--- a/s.el
+++ b/s.el
@@ -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)