emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/objed e427899 12/16: Get context object when acting on


From: Clemens Radermacher
Subject: [elpa] externals/objed e427899 12/16: Get context object when acting on sexp object (toggle state etc.)
Date: Mon, 4 Feb 2019 07:46:32 -0500 (EST)

branch: externals/objed
commit e427899060209fb953c0c3032a18e525b49940ac
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>

    Get context object when acting on sexp object (toggle state etc.)
---
 objed.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/objed.el b/objed.el
index 1ebb254..e1bba10 100644
--- a/objed.el
+++ b/objed.el
@@ -1739,14 +1739,16 @@ If called from code decide for activation with char 
object using
   "Activate and move to beginning of object at point."
   (interactive)
   (objed--init 'char)
-  (objed-current-or-previous-context))
+  (when (objed-context-object)
+    (goto-char (objed--beg))))
 
 ;;;###autoload
 (defun objed-end-of-object-at-point ()
   "Activate and move to end of object at point."
   (interactive)
   (objed--init 'char)
-  (objed-current-or-next-context))
+  (when (objed-context-object)
+    (goto-char (objed--end))))
 
 (defun objed-toggle-side ()
   "Move to other side of object.
@@ -1780,6 +1782,8 @@ Update to object at current side."
 (defun objed-toggle-state ()
   "Toggle state of object."
   (interactive)
+  (when (eq objed--object 'sexp)
+    (objed-context-object))
   (let ((sdiff (abs (- (point) (objed--beg))))
         (ediff (abs (- (point) (objed--end)))))
     (objed--reverse)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]