[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/objed 6f06795 034/166: Add commands which move to prev/
From: |
Clemens Radermacher |
Subject: |
[elpa] externals/objed 6f06795 034/166: Add commands which move to prev/next object, ignoring context |
Date: |
Sun, 29 Dec 2019 08:20:56 -0500 (EST) |
branch: externals/objed
commit 6f06795e412cd916c6d2f10f0a918b749a8bd83e
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>
Add commands which move to prev/next object, ignoring context
---
objed-objects.el | 10 +++++++++-
objed.el | 13 +++++++++++++
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/objed-objects.el b/objed-objects.el
index a4f5940..dfe831c 100644
--- a/objed-objects.el
+++ b/objed-objects.el
@@ -409,13 +409,21 @@ OBJ is the object to use and defaults to
`objed--current-obj'."
(let ((obj (or obj objed--current-obj)))
(objed--apply #'max obj)))
+(defvar objed--basic-objects
+ '(sexp line identifier word char region buffer)
+ "Basic objects.
+
+Basic object are objects which have no next/previous or which
+have their own movement commands.")
+
+
(defun objed--basic-p ()
"Return non-nil if current object is a basic object.
From basic objects `objed' starts expanding to context objects.
Thus this should be objects which have their own movement
commands."
- (memq objed--object '(sexp line identifier word char region buffer)))
+ (memq objed--object objed--basic-objects))
(defun objed--current (&optional obj)
"Get the current range of interest.
diff --git a/objed.el b/objed.el
index e2407df..bc69932 100644
--- a/objed.el
+++ b/objed.el
@@ -1824,6 +1824,19 @@ postitive prefix argument ARG move to the nth previous
object."
(when (eq pos (point))
(error "No previous %s" objed--object)))))
+(defun objed-previous (&optional arg)
+ "Move to ARG previous object of current type."
+ (interactive "p")
+ (let ((objed--basic-objects nil))
+ (objed-current-or-previous-context arg)))
+
+
+(defun objed-next (&optional arg)
+ "Move to ARG next object of current type."
+ (interactive "p")
+ (let ((objed--basic-objects nil))
+ (objed-current-or-next-context arg)))
+
(defun objed-current-or-next-context (&optional arg)
"Move to beginning of object at point and activate it.
- [elpa] externals/objed 2a634b8 054/166: Make append mode global, (continued)
- [elpa] externals/objed 2a634b8 054/166: Make append mode global, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 828037d 045/166: Improve init/reset checks, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 7d51f03 058/166: Merge branch 'master' of github.com:clemera/objed, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed ceeff84 057/166: Allow defining objects by regex, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 72592a9 062/166: Change bindings for barf/slurp sexps, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed c086dce 069/166: Make [/] context independent by default, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed a7b8c48 070/166: Update docs, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 890b8b7 044/166: Add init function for hooks, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 963841d 025/166: Improve continuation object, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 09cca2c 028/166: Allow numeric prefix arg for kill/delete op, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 6f06795 034/166: Add commands which move to prev/next object, ignoring context,
Clemens Radermacher <=
- [elpa] externals/objed 73b99ed 036/166: Improve objed-ace, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 7930c68 038/166: Make word movement aware of object state, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed bea49a2 051/166: Fix word object at eob, too., Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 58669ec 049/166: Fix backward/forward until context, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 6eb0fd5 052/166: Adjust objed-append-mode, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 1846dd8 053/166: Deactivate append mode on yank, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed b978583 055/166: add (require 'hl-line), Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 6c34f45 059/166: Change binding for objed-occur, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 6096696 063/166: Add alternate bindings for barf/slurp, Clemens Radermacher, 2019/12/29
- [elpa] externals/objed 7e25c50 061/166: Add forward slurp/barf sexp commands, Clemens Radermacher, 2019/12/29