[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/objed 37d8657 4/9: Fix object dispatch, don't init twic
From: |
Clemens Radermacher |
Subject: |
[elpa] externals/objed 37d8657 4/9: Fix object dispatch, don't init twice, return object on init |
Date: |
Mon, 18 Mar 2019 13:20:57 -0400 (EDT) |
branch: externals/objed
commit 37d86576a03a5a28be2a5c882df3b47495ec221d
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>
Fix object dispatch, don't init twice, return object on init
---
objed-objects.el | 2 +-
objed.el | 50 ++++++++++++++++++++++++++------------------------
2 files changed, 27 insertions(+), 25 deletions(-)
diff --git a/objed-objects.el b/objed-objects.el
index 3fa9ff3..bb3b1a0 100644
--- a/objed-objects.el
+++ b/objed-objects.el
@@ -2192,7 +2192,7 @@ non-nil the indentation block can contain empty lines."
(or (looking-at "<")
(looking-back ">" 1)))
:get-obj
- ;; TODO: fix detection if point inside <..|..>
+ ;; TODO: fix sgml-backward not working
(when (derived-mode-p 'sgml-mode)
;; like with bracket detect at boundary
(objed-make-object
diff --git a/objed.el b/objed.el
index f903259..264aafe 100644
--- a/objed.el
+++ b/objed.el
@@ -228,6 +228,7 @@ function should return nil if objed should not initialize."
(comint-next-prompt . output)
(forward-button . face)
(backward-button . face)
+ (sgml-skip-tag-backward . tag)
(Info-next-reference . face)
(Info-prev-reference . face)
(objed-next-identifier . identifier)
@@ -530,7 +531,7 @@ update to given object."
(cond (binding
(funcall (cdr binding) name))
(t
- (when (objed--switch-to name)
+ (when (objed--init name)
(goto-char (objed--beg)))))))
@@ -1253,29 +1254,30 @@ or object position data."
(set-cursor-color objed-cursor-color)
;; init object
- (cond ((commandp sym)
- (objed--switch-to-object-for-cmd sym))
- ((symbolp sym)
- (objed--switch-to sym))
- (t
- (unless objed--object
- (setq objed--object 'char))
- ;; uses objed--object
- (objed--update-current-object sym)))
- ;; make sure the object is highlighted
- (hl-line-highlight)
-
- ;; transient map
- (fset #'objed--exit-objed
- (set-transient-map objed-map
- #'objed--keep-transient-p
- #'objed--reset))
-
- (when objed-modeline-hint-p
- (funcall objed-modeline-setup-func objed-mode-line-format))
- ;; show which key after redisplay if active
- (when objed-auto-wk-top-level-p
- (run-at-time 0 nil #'objed-show-top-level)))
+ (prog1 (cond ((commandp sym)
+ (objed--switch-to-object-for-cmd sym))
+ ((symbolp sym)
+ (objed--switch-to sym))
+ (t
+ (unless objed--object
+ (setq objed--object 'char))
+ ;; uses objed--object
+ (objed--update-current-object sym)))
+
+ ;; make sure the object is highlighted
+ (hl-line-highlight)
+
+ ;; transient map
+ (fset #'objed--exit-objed
+ (set-transient-map objed-map
+ #'objed--keep-transient-p
+ #'objed--reset))
+
+ (when objed-modeline-hint-p
+ (funcall objed-modeline-setup-func objed-mode-line-format))
+ ;; show which key after redisplay if active
+ (when objed-auto-wk-top-level-p
+ (run-at-time 0 nil #'objed-show-top-level))))
(defun objed--setup-mode-line (format &optional reset)
- [elpa] externals/objed updated (4cb9beb -> f3ebfe4), Clemens Radermacher, 2019/03/18
- [elpa] externals/objed 82c27ed 5/9: Refactor identifier code, Clemens Radermacher, 2019/03/18
- [elpa] externals/objed fb2e556 6/9: Remove section object from block objects, Clemens Radermacher, 2019/03/18
- [elpa] externals/objed a0c7e92 7/9: Remove line object from block expansion, line object has its own key, Clemens Radermacher, 2019/03/18
- [elpa] externals/objed f3ebfe4 9/9: Version bump, Clemens Radermacher, 2019/03/18
- [elpa] externals/objed 37d8657 4/9: Fix object dispatch, don't init twice, return object on init,
Clemens Radermacher <=
- [elpa] externals/objed 03d7b47 8/9: Change order of block expansions, Clemens Radermacher, 2019/03/18
- [elpa] externals/objed 3816854 2/9: Don't choose next object on repeat, Clemens Radermacher, 2019/03/18
- [elpa] externals/objed a90d8e3 3/9: Move to start of identifier for objed-identifier, Clemens Radermacher, 2019/03/18
- [elpa] externals/objed 7968f68 1/9: Formatting fixes, Clemens Radermacher, 2019/03/18