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

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

[elpa] externals/objed 8b08ae2 4/9: Accept object position data for init


From: Clemens Radermacher
Subject: [elpa] externals/objed 8b08ae2 4/9: Accept object position data for init
Date: Fri, 1 Mar 2019 15:30:43 -0500 (EST)

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

    Accept object position data for init
---
 objed.el | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/objed.el b/objed.el
index b813d89..06e49b7 100644
--- a/objed.el
+++ b/objed.el
@@ -1138,7 +1138,8 @@ See `objed-cmd-alist'."
 (defun objed--init (&optional sym)
   "Initialize `objed'.
 
-SYM is a symbol (command or object symbol) used to initialize."
+SYM is a symbol (command or object symbol) used to initialize
+or object position data."
   ;; if anything went wrong make sure to start with clean state
   (when objed--buffer
     (objed--reset))
@@ -1181,9 +1182,11 @@ SYM is a symbol (command or object symbol) used to 
initialize."
   (set-cursor-color objed-cursor-color)
 
   ;; init object
-  (if (commandp sym)
-      (objed--switch-to-object-for-cmd sym)
-    (objed--switch-to sym))
+  (cond ((commandp sym)
+         (objed--switch-to-object-for-cmd sym))
+        ((symbolp sym)
+         (objed--switch-to sym))
+        (t (objed--update-current-object sym)))
 
   ;; transient map
   (fset #'objed--exit-objed



reply via email to

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