[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/objed 50769c9 3/9: Fix speedup version for identifier o
From: |
Clemens Radermacher |
Subject: |
[elpa] externals/objed 50769c9 3/9: Fix speedup version for identifier object |
Date: |
Fri, 1 Mar 2019 15:30:42 -0500 (EST) |
branch: externals/objed
commit 50769c9b42e03174ca0aa632bd778047b2197d14
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>
Fix speedup version for identifier object
---
objed.el | 38 ++++++++++++++++++++++++--------------
1 file changed, 24 insertions(+), 14 deletions(-)
diff --git a/objed.el b/objed.el
index 1248de1..b813d89 100644
--- a/objed.el
+++ b/objed.el
@@ -1664,25 +1664,35 @@ postitive prefix argument ARG move to the nth next
object."
(defun objed-top-object ()
"Go to first instance of current object type."
(interactive)
- (let ((top (save-excursion
- (goto-char (point-min))
- (objed--get-next (point)))))
- (if (equal top objed--current-obj)
- (message "Already at first instance")
- (objed--update-current-object top)
- (goto-char (objed--beg)))))
+ ;; TODO: creat macro keyword so delegation
+ ;; can happen automatically, when specified
+ (cond ((eq objed--object 'identifier)
+ (objed-first-identifier)
+ (objed--update-current-object))
+ (t
+ (let ((top (save-excursion
+ (goto-char (point-min))
+ (objed--get-next (point)))))
+ (if (equal top objed--current-obj)
+ (message "Already at first instance")
+ (objed--update-current-object top)
+ (goto-char (objed--beg)))))))
(defun objed-bottom-object ()
"Go to first instance of current object type."
(interactive)
- (let ((bot (save-excursion
- (goto-char (point-max))
- (objed--get-prev (point)))))
- (if (equal bot objed--current-obj)
- (message "Already at last instance")
- (objed--update-current-object bot)
- (goto-char (objed--beg)))))
+ (cond ((eq objed--object 'identifier)
+ (objed-last-identifier)
+ (objed--update-current-object))
+ (t
+ (let ((bot (save-excursion
+ (goto-char (point-max))
+ (objed--get-prev (point)))))
+ (if (equal bot objed--current-obj)
+ (message "Already at last instance")
+ (objed--update-current-object bot)
+ (goto-char (objed--beg)))))))
(defun objed-expand-context ()
- [elpa] externals/objed updated (bdfe220 -> 65d3430), Clemens Radermacher, 2019/03/01
- [elpa] externals/objed 8b08ae2 4/9: Accept object position data for init, Clemens Radermacher, 2019/03/01
- [elpa] externals/objed af6490a 2/9: Speedup goto first/last object, Clemens Radermacher, 2019/03/01
- [elpa] externals/objed 50769c9 3/9: Fix speedup version for identifier object,
Clemens Radermacher <=
- [elpa] externals/objed 70f20ec 1/9: Add objed-mode commands to move to first last instance of identifier, Clemens Radermacher, 2019/03/01
- [elpa] externals/objed 97efbbe 5/9: Ensure objed exits when entering the minibuffer, Clemens Radermacher, 2019/03/01
- [elpa] externals/objed 95e5438 7/9: Update key descriptions, Clemens Radermacher, 2019/03/01
- [elpa] externals/objed 1b7af5b 8/9: Change some default bindings, Clemens Radermacher, 2019/03/01
- [elpa] externals/objed 2742f55 6/9: Add two commands to move to ibeg/ieng of oap, Clemens Radermacher, 2019/03/01
- [elpa] externals/objed 65d3430 9/9: Version bump, Clemens Radermacher, 2019/03/01