[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/objed c000147 08/59: Error when no next/prev object whe
From: |
Clemens Radermacher |
Subject: |
[elpa] externals/objed c000147 08/59: Error when no next/prev object when using next/prev command |
Date: |
Sun, 24 Mar 2019 06:06:34 -0400 (EDT) |
branch: externals/objed
commit c00014790426af610186a1e10a0b0b9f38358e86
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>
Error when no next/prev object when using next/prev command
---
objed-objects.el | 4 ++--
objed.el | 11 ++++++++---
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/objed-objects.el b/objed-objects.el
index 23af8b7..6465df1 100644
--- a/objed-objects.el
+++ b/objed-objects.el
@@ -2074,7 +2074,7 @@ non-nil the indentation block can contain empty lines."
(goto-char (car bds))
(when (or (eq real-this-command #'objed-next-identifier)
(eq real-this-command #'objed-goto-next-identifier))
- (run-at-time 0 nil (apply-partially #'message "Last one!"))))))))
+ (run-at-time 0 nil (apply-partially #'message "No next
identifier"))))))))
(defun objed--prev-identifier ()
"Move to previous identifier."
@@ -2091,7 +2091,7 @@ non-nil the indentation block can contain empty lines."
(goto-char (car bds))
(when (or (eq real-this-command #'objed-prev-identifier)
(eq real-this-command #'objed-goto-prev-identifier))
- (run-at-time 0 nil (apply-partially #'message "First
one!")))))))))
+ (run-at-time 0 nil (apply-partially #'message "No previous
identifier")))))))))
diff --git a/objed.el b/objed.el
index c84bbb5..7df3b6f 100644
--- a/objed.el
+++ b/objed.el
@@ -1739,8 +1739,10 @@ postitive prefix argument ARG move to the nth previous
object."
(interactive "p")
(if (objed--basic-p)
(objed-context-object)
- ;; toggle side if coming from next?
- (objed--goto-previous (or arg 1))))
+ (let ((pos (point)))
+ (objed--goto-previous (or arg 1))
+ (when (eq pos (point))
+ (error "No previous %s" objed--object)))))
(defun objed-current-or-next-context (&optional arg)
@@ -1756,7 +1758,10 @@ postitive prefix argument ARG move to the nth next
object."
(when (and (region-active-p)
(eq last-command 'objed-extend))
(exchange-point-and-mark))
- (objed--goto-next (or arg 1))))
+ (let ((pos (point)))
+ (objed--goto-next (or arg 1))
+ (when (eq pos (point))
+ (error "No next %s" objed--object)))))
(defun objed-top-object ()
"Go to first instance of current object type."
- [elpa] externals/objed 4936ef0 18/59: Optionally use expand-region for extend expansion, (continued)
- [elpa] externals/objed 4936ef0 18/59: Optionally use expand-region for extend expansion, Clemens Radermacher, 2019/03/24
- [elpa] externals/objed 00fd599 09/59: Skip leading ws on first/last instance command, too, Clemens Radermacher, 2019/03/24
- [elpa] externals/objed d56bf74 07/59: Don't ignore errors for try-next/prev, Clemens Radermacher, 2019/03/24
- [elpa] externals/objed 68c2a1e 01/59: Improve quit window, reformat if in edit buffer, Clemens Radermacher, 2019/03/24
- [elpa] externals/objed 5761dcf 29/59: Obey lexical binding for eval op, Clemens Radermacher, 2019/03/24
- [elpa] externals/objed 77fad58 19/59: If region is activated, deactivate it first on objed-quit, Clemens Radermacher, 2019/03/24
- [elpa] externals/objed 1c04620 49/59: Skip docstring for inner elisp defun object, Clemens Radermacher, 2019/03/24
- [elpa] externals/objed e771f06 14/59: Improve ace object, Clemens Radermacher, 2019/03/24
- [elpa] externals/objed 395708b 13/59: Update object bindings, Clemens Radermacher, 2019/03/24
- [elpa] externals/objed 7e0bf6f 12/59: Change binding for word object in object map, Clemens Radermacher, 2019/03/24
- [elpa] externals/objed c000147 08/59: Error when no next/prev object when using next/prev command,
Clemens Radermacher <=
- [elpa] externals/objed ae7b3e8 06/59: Dont exit objed on macro recording/execution, Clemens Radermacher, 2019/03/24
- [elpa] externals/objed 033b5aa 05/59: Exchange point and mark when toggling side selection, Clemens Radermacher, 2019/03/24
- [elpa] externals/objed 2170235 02/59: Update description, Clemens Radermacher, 2019/03/24
- [elpa] externals/objed 37f455e 15/59: Add region to object map, Clemens Radermacher, 2019/03/24
- [elpa] externals/objed 68bae26 10/59: Give feedback if already at last/first identifier, Clemens Radermacher, 2019/03/24
- [elpa] externals/objed aa4104e 03/59: Improve reformat, Clemens Radermacher, 2019/03/24