[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/objed 870d125 068/166: Update docstrings for regex obje
From: |
Clemens Radermacher |
Subject: |
[elpa] externals/objed 870d125 068/166: Update docstrings for regex objects |
Date: |
Sun, 29 Dec 2019 08:21:02 -0500 (EST) |
branch: externals/objed
commit 870d1250809c92b7f807431d63e98046b6daab9f
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>
Update docstrings for regex objects
---
objed-objects.el | 32 +++++++++++++++++++++-----------
1 file changed, 21 insertions(+), 11 deletions(-)
diff --git a/objed-objects.el b/objed-objects.el
index 561386d..5612182 100644
--- a/objed-objects.el
+++ b/objed-objects.el
@@ -70,13 +70,18 @@
(eval-and-compile
(require 'rx)
(defun objed--get-regex-object (bregex eregex)
- "Return regex object if point is within region limited by BREGEX, EREGEX.
+ "Return regex object between BREGEX and 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.
+The inner object part will be the text between the matches for
+those two expressions.
-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."
+BREGEX is the regular expression for the start of the object. If
+the regular expressions contains a group, any text which is part
+of this group will belong to the inner object part.
+
+EREGEX is the regular expression for the end of the object. If
+the regular expressions contains a group, any text which is part
+of this group will belong to the inner object part."
(let* ((obounds ())
(ibounds ())
(opos (point)))
@@ -185,20 +190,22 @@ property list where each key has an associated progn."
(push keyw wrapped)
;; allowed to move point
(cond ((memq vkeyw '(:try-next :try-prev :ref))
- (push `(let ((objed--block-p t)) ,@(nreverse forms))
+ (push `(let ((objed--block-p t))
+ ,@(nreverse forms))
wrapped))
((memq vkeyw '(:beg :end :ibeg :iend))
(if (and (not (cdr forms))
(stringp (car forms)))
(push (car forms) wrapped)
- (if (eq (caar forms) 'rx)
+ (if (and (not (cdr forms))
+ (eq (caar forms) 'rx))
(push (macroexpand-1 (car forms))
wrapped)
(push `(let ((objed--block-p t))
,@(nreverse forms))
wrapped))))
(t
- ;; objed--block-p: dont run objeds advices here...
+ ;; objed--block-p: dont run objeds advices here
(push `(let ((objed--block-p t))
(save-mark-and-excursion
,@(nreverse forms)))
@@ -244,9 +251,12 @@ there is no object at point the code should return nil.
:beg, :ibeg, :end, :iend
These keywords can be used instead of :get-obj above. The value
-for each is the code to run which should return point position
-for corresponding keyword. Point is allword to move. The code
-runs in the same order the keywords are provided.
+for each is the code to run which should return the point
+position corresponding to the keyword. Point is allword to move
+between the keyword expression. The code runs in the same order
+the keywords are provided. It is also possible to use only :beg
+and :end with regular expressions to define an object. See
+`objed--get-regex-object' for details of their format.
:try-next (optional)
- [elpa] externals/objed c666cea 076/166: Fix some sexp issues, (continued)
- [elpa] externals/objed c666cea 076/166: Fix some sexp issues, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 0d506fa 074/166: Allow specifying a fallback object for init, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 9fbd47f 084/166: Fix org field object, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 8861388 082/166: Auto switch from sexp object only for interactive state toggle, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 1cad7c2 086/166: Start with line object if not current for block expansion, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 13e7829 093/166: Fix word object navigation with objed-next/prev for inner subwords, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 213f672 094/166: Use prefixed word of symbol for inner ident object, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed c02f3c1 071/166: Add description for uppercase kill/delete, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed f01a171 072/166: Make objed-init suitable for advices, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed db8850a 064/166: Improve regex object, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 870d125 068/166: Update docstrings for regex objects,
Clemens Radermacher <=
- [elpa] externals/objed 5aa473d 078/166: Reset before quit window when objed is active, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 354d5fa 079/166: Don't bind scrolling commands, use char object for scrolling, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 35feabb 085/166: Add function to get align section bounds, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 36ff680 087/166: Adjust bindings and add additional custom user map binding, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 1dc62ca 089/166: Improve block expansion, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed c07df28 088/166: Rewrite align section getter function, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 107096a 092/166: Improve block expansion order in comments, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 2f3734b 095/166: Use inner word as symbol prefix, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 98a94d3 098/166: Change description for block and context objects, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 1b5b4df 096/166: Add optional subword object, Clemens Radermacher, 2019/12/29