branch: master
commit 4e218824039090af6e579dabe91ebfaaa291440d
Author: Dmitry Gutov <[email protected]>
Commit: Dmitry Gutov <[email protected]>

    mmm-match-region: Return front-pos even without front-delim; likewise for 
back
    
    Fixes #53
---
 mmm-class.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mmm-class.el b/mmm-class.el
index 436e85a..5ea40a7 100644
--- a/mmm-class.el
+++ b/mmm-class.el
@@ -224,7 +224,7 @@ and OK-RESUME if the region is valid."
     (let ((beg (mmm-match->point include-front front-offset front-match))
          (front-pos (if front-delim
                         (mmm-match->point t front-delim front-match)
-                      nil))
+                      (match-beginning front-match)))
           (invalid-resume (match-end front-match))
           (front-form (mmm-get-form front-form)))
       (let ((submode (if match-submode
@@ -257,9 +257,9 @@ and OK-RESUME if the region is valid."
                                        back-offset back-match))
                 (back-pos (if back-delim
                               (mmm-match->point nil back-delim back-match)
-                            nil))
+                            (match-end back-match)))
                 (back-form (mmm-get-form back-form))
-                (ok-resume (if end-not-begin 
+                (ok-resume (if end-not-begin
                                (match-end back-match)
                              end)))
             (values beg end front-pos back-pos front-form back-form

Reply via email to