[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/objed 69dcc5b 066/166: Use first regex group of regex o
From: |
Clemens Radermacher |
Subject: |
[elpa] externals/objed 69dcc5b 066/166: Use first regex group of regex object to delemit inner part |
Date: |
Sun, 29 Dec 2019 08:21:02 -0500 (EST) |
branch: externals/objed
commit 69dcc5b89d8ea8b58fc730f042e28530f297848c
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>
Use first regex group of regex object to delemit inner part
---
objed-objects.el | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/objed-objects.el b/objed-objects.el
index f947c80..78fe8af 100644
--- a/objed-objects.el
+++ b/objed-objects.el
@@ -69,7 +69,13 @@
(eval-and-compile
(defun objed--get-regex-object (bregex eregex)
- "Return regex object if point is within region limited by BREGEX, EREGEX."
+ "Return regex object if point is within region limited by BREGEX, EREGEX.
+
+BREGEX is the regular expression for the start of the object. Anything
+in it's first regex group is considered to be part of the inner object.
+
+EREGEX is the regular expression for the end of the object. Anything
+in it's first regex group is considered to be part of the inner object."
(let* ((obounds ())
(ibounds ())
(opos (point)))
@@ -86,21 +92,19 @@
(match-beginning 0)))))
(when (and ;; goto possible start
(re-search-backward bregex nil t)
- (push (or (match-end 1)
+ (push (or (match-beginning 1)
(match-end 0))
ibounds)
- (push (or (match-beginning 1)
- (match-beginning 0))
+ (push (match-beginning 0)
obounds)
;; goto possible end
(goto-char (or (match-end 1)
(match-end 0)))
(re-search-forward eregex nil t)
- (push (or (match-beginning 1)
+ (push (or (match-end 1)
(match-beginning 0))
ibounds)
- (push (or (match-end 1)
- (match-end 0))
+ (push (match-end 0)
obounds)
;; when point was within start and end
(<= (cadr obounds) opos (car obounds)))
- [elpa] externals/objed aa776a8 113/166: Make filling paragraphs repeatable, (continued)
- [elpa] externals/objed aa776a8 113/166: Make filling paragraphs repeatable, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 44bb1d2 116/166: Add char object to keeper objects, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 1127d6f 111/166: Adjust default binding scheme again, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed f74e3c8 115/166: Refractor object continuation code, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 80cdd01 121/166: Update docstring, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 470575e 035/166: Update docs., Clemens Radermacher, 2019/12/29
- [elpa] externals/objed b3e44ca 047/166: Change init policy, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 244acd2 073/166: Allow passing object to objed-init again, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 43befe6 050/166: Stop weird behavior of line and char object at eob, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 7b86d64 056/166: Merge pull request #45 from eabarbosa/master, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 69dcc5b 066/166: Use first regex group of regex object to delemit inner part,
Clemens Radermacher <=
- [elpa] externals/objed 210d3db 077/166: Improve sexp object for non symetric commands, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed fa06574 075/166: Don't init when other modes have set overriding-terminal-local-map, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 752d11e 080/166: Change binding for sexp object, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 50f79c8 091/166: Include textblock for block expansion when at comment, too, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed dcea2bc 124/166: Add window resize commands, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed fc93d49 134/166: Improve error object when flymake is used, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed d111035 140/166: Require mc if necessary, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 6a2663e 138/166: Don't bind C-o by default, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed dc23da4 153/166: Add objed-exit-hook #57, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed faa9fb0 158/166: Allow defining objects without ending regexp (#58), Clemens Radermacher, 2019/12/29