[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/objed 41be963 054/216: Adjust textblock and block objec
From: |
Stefan Monnier |
Subject: |
[elpa] externals/objed 41be963 054/216: Adjust textblock and block object order |
Date: |
Tue, 8 Jan 2019 12:29:10 -0500 (EST) |
branch: externals/objed
commit 41be963b8dc9c8133d249d5fdfa7ddccd6ee2798
Author: Clemera <address@hidden>
Commit: Clemera <address@hidden>
Adjust textblock and block object order
---
objed-objects.el | 27 +++++++++++----------------
objed.el | 2 +-
2 files changed, 12 insertions(+), 17 deletions(-)
diff --git a/objed-objects.el b/objed-objects.el
index 6b416ab..4b32c0a 100644
--- a/objed-objects.el
+++ b/objed-objects.el
@@ -1407,28 +1407,21 @@ Ignores simple structured expressions like words or
symbols."
(objed-define-object nil textblock
:get-obj
- (when (or (not (derived-mode-p 'prog-mode))
- (derived-mode-p 'text-mode)
- (objed--in-comment-p)
- (objed--in-string-p))
+ (if (or (not (derived-mode-p 'prog-mode))
+ (derived-mode-p 'text-mode)
+ (objed--in-comment-p)
+ (objed--in-string-p))
(objed--with-narrow-for-text
(let ((bounds (objed--get-textblock-bounds)))
(when (and bounds
(or (not (eq (car bounds) (point-min)))
(not (eq (cdr bounds) (point-max)))))
- (objed-make-object :obounds bounds)))))
-
+ (objed-make-object :obounds bounds))))
+ (error "No textblock here"))
:try-next
- (forward-word 1)
- (or (objed--in-string-or-comment-p)
- (derived-mode-p 'text-mode)
- (not (derived-mode-p 'prog-mode)))
-
+ (forward-sentence 1)
:try-prev
- (forward-word -1)
- (or (objed--in-string-or-comment-p)
- (derived-mode-p 'text-mode)
- (not (derived-mode-p 'prog-mode))))
+ (forward-sentence -1))
(defun objed--column (pos)
@@ -1897,13 +1890,15 @@ non-nil the indentation block can contain empty lines."
(defun objed--what-face (&optional pos)
+ "Return face at POS."
(let* ((pos (or pos (point)))
(face (or (get-text-property pos 'face))))
(unless (keywordp (car-safe face)) (list face))))
;; from `evil-textobj-syntax'
-(defun objed--get-syntax-range (&optional inclusive arg)
+(defun objed--get-syntax-range ()
+ "Return range of equal face before/after point."
(let ((point-face (objed--what-face))
(backward-point (point)) ; last char when stop, including white space
(backward-none-space-point (point)) ; last none white space char
diff --git a/objed.el b/objed.el
index 547087c..6bc59af 100644
--- a/objed.el
+++ b/objed.el
@@ -1252,7 +1252,7 @@ matches IREGEX is not displayed."
;; * Basic Movement, Block Objects (textblocks)
-(defvar objed--block-objects '(line buffer iblock section paragraph indent
textblock)
+(defvar objed--block-objects '(line buffer iblock section textblock indent
paragraph)
"List of objects which are 'line based'.
Objects which are built by lines of text.")
- [elpa] externals/objed 430d858 037/216: Add more command to move objects around and change bindings for them, (continued)
- [elpa] externals/objed 430d858 037/216: Add more command to move objects around and change bindings for them, Stefan Monnier, 2019/01/08
- [elpa] externals/objed 64dc38b 035/216: More on indent/move commands, Stefan Monnier, 2019/01/08
- [elpa] externals/objed d5dd1d0 045/216: Fix function name, Stefan Monnier, 2019/01/08
- [elpa] externals/objed f33147d 043/216: Add syntax object adjusted from laishulu/evil-textobj-syntax, Stefan Monnier, 2019/01/08
- [elpa] externals/objed 8c3ba86 040/216: Add note about changing bindings, Stefan Monnier, 2019/01/08
- [elpa] externals/objed 95503ca 046/216: Fix syntax object, Stefan Monnier, 2019/01/08
- [elpa] externals/objed 7ad08e2 052/216: Set C-h to work as usual, Stefan Monnier, 2019/01/08
- [elpa] externals/objed dc8c569 033/216: Improve surround op, Stefan Monnier, 2019/01/08
- [elpa] externals/objed 1f09072 064/216: Improve file object, Stefan Monnier, 2019/01/08
- [elpa] externals/objed 96c6b8f 065/216: Add DEL key for in buffer replacement, fixes #6, Stefan Monnier, 2019/01/08
- [elpa] externals/objed 41be963 054/216: Adjust textblock and block object order,
Stefan Monnier <=
- [elpa] externals/objed 843d843 059/216: Remove textblock from context objects, Stefan Monnier, 2019/01/08
- [elpa] externals/objed de241e3 048/216: Start to support mc, Stefan Monnier, 2019/01/08
- [elpa] externals/objed ebad1ac 061/216: Fix face object, Stefan Monnier, 2019/01/08
- [elpa] externals/objed 042c3bb 051/216: Change some bindings, Stefan Monnier, 2019/01/08
- [elpa] externals/objed f605604 057/216: Rename syntax object to face object, Stefan Monnier, 2019/01/08
- [elpa] externals/objed e94dc45 049/216: Remove :get-inner, Stefan Monnier, 2019/01/08
- [elpa] externals/objed ad88f19 074/216: Fix markup!!!, Stefan Monnier, 2019/01/08
- [elpa] externals/objed 37449f5 063/216: Update link, Stefan Monnier, 2019/01/08
- [elpa] externals/objed 975a8f3 082/216: Rewording, Stefan Monnier, 2019/01/08
- [elpa] externals/objed 4badbe8 047/216: Simplify object macro usage (allow to use bounds of thing etc.), Stefan Monnier, 2019/01/08