[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/objed 7ba5cb2 088/216: New until beg/end of buffer beha
From: |
Stefan Monnier |
Subject: |
[elpa] externals/objed 7ba5cb2 088/216: New until beg/end of buffer behavior |
Date: |
Tue, 8 Jan 2019 12:29:17 -0500 (EST) |
branch: externals/objed
commit 7ba5cb2fc212ef5c409967c149befac5fa3ce34d
Author: Clemera <address@hidden>
Commit: Clemera <address@hidden>
New until beg/end of buffer behavior
---
objed.el | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/objed.el b/objed.el
index f12d1ce..3ad3e0c 100644
--- a/objed.el
+++ b/objed.el
@@ -286,8 +286,8 @@ See also `objed-disabled-p'"
(move-end-of-line . line)
(previous-line . line)
(next-line . line)
- (beginning-of-buffer . line)
- (end-of-buffer . char)
+ (beginning-of-buffer . buffer)
+ (end-of-buffer . buffer)
(scroll-up-command . line)
(scroll-down-command . line)
(xref-find-definitions . line)
@@ -486,6 +486,8 @@ exit function is called after execution of the operation.")
(defvar objed--after-init-alist
'((move-end-of-line . objed--object-trailing-line)
(org-end-of-line . objed--object-trailing-line)
+ (beginning-of-buffer . objed--until-start)
+ (end-of-buffer . objed--until-end)
(backward-sentence . objed--goto-start))
"Maps commands which need special initialization to init functions.
@@ -1073,6 +1075,18 @@ See `objed-cmd-alist'."
(objed--reverse))
(objed--change-to :beg pos :ibeg pos))
+(defun objed--until-start (pos)
+ "Activate from part from POS until start."
+ (objed--change-to :end pos :iend pos))
+
+(defun objed--until-end (pos)
+ "Activate part from POS until end."
+ ;; workaround: end-of-buffer behaves weird opoint is wrong
+ ;; use the mark instead
+ (if (eq this-command #'end-of-buffer)
+ (objed--change-to :beg (mark) :ibeg (mark))
+ (objed--change-to :beg pos :ibeg pos)))
+
(defun objed--init (&optional sym)
"Initialize `objed'.
- [elpa] externals/objed c846b15 141/216: Init only where C-n is bound to something other than next-line, (continued)
- [elpa] externals/objed c846b15 141/216: Init only where C-n is bound to something other than next-line, Stefan Monnier, 2019/01/08
- [elpa] externals/objed 50c2367 155/216: Mention move objects functionality, Stefan Monnier, 2019/01/08
- [elpa] externals/objed f8af251 080/216: General cleanup, Stefan Monnier, 2019/01/08
- [elpa] externals/objed 72053b7 109/216: Simplify macro usage again, Stefan Monnier, 2019/01/08
- [elpa] externals/objed 9558b39 098/216: Add ace char object, Stefan Monnier, 2019/01/08
- [elpa] externals/objed 49082c7 167/216: Accept 1 as universal arg, Stefan Monnier, 2019/01/08
- [elpa] externals/objed 185fe41 111/216: Remove unused lexical var, Stefan Monnier, 2019/01/08
- [elpa] externals/objed 8a74424 125/216: Optimize init/reset procedure, avoid unnecessary re-initialization, Stefan Monnier, 2019/01/08
- [elpa] externals/objed 9c1b350 067/216: Update link, Stefan Monnier, 2019/01/08
- [elpa] externals/objed 7abf5b3 091/216: Fixes #3, switch to remote object with '#', Stefan Monnier, 2019/01/08
- [elpa] externals/objed 7ba5cb2 088/216: New until beg/end of buffer behavior,
Stefan Monnier <=
- [elpa] externals/objed 22392cf 099/216: Add whitepsace objects, fixes #2, Stefan Monnier, 2019/01/08
- [elpa] externals/objed f3efa0e 121/216: Don't let sentence object jump over to next comments/string, Stefan Monnier, 2019/01/08
- [elpa] externals/objed 192217a 066/216: Add no-skip option and block object, Stefan Monnier, 2019/01/08
- [elpa] externals/objed a2df7ab 075/216: Stay active when using describe key in modal state, Stefan Monnier, 2019/01/08
- [elpa] externals/objed b7fbf71 106/216: Fixes #12, collect no-skipping objects correctly, Stefan Monnier, 2019/01/08
- [elpa] externals/objed 29bccb0 042/216: Whitespace cleanup, Stefan Monnier, 2019/01/08
- [elpa] externals/objed 2e1e5c1 110/216: Run compilation as part of make test, Stefan Monnier, 2019/01/08
- [elpa] externals/objed 433e92d 104/216: Block objed advices in object body codes, Stefan Monnier, 2019/01/08
- [elpa] externals/objed 79ec8af 116/216: Fix boundary error, Stefan Monnier, 2019/01/08
- [elpa] externals/objed 5a1c9f7 122/216: Improve char switching with objec-ace, Stefan Monnier, 2019/01/08