[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/objed 6ea0268 01/21: Buffer switch: Keep objed--object
From: |
Clemens Radermacher |
Subject: |
[elpa] externals/objed 6ea0268 01/21: Buffer switch: Keep objed--object if possible, and update highlight |
Date: |
Sun, 17 Mar 2019 15:00:15 -0400 (EDT) |
branch: externals/objed
commit 6ea026853f729576908884deff12648eb86d9d4f
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>
Buffer switch: Keep objed--object if possible, and update highlight
Fixes #33
---
objed.el | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/objed.el b/objed.el
index 0947511..1c85bbe 100644
--- a/objed.el
+++ b/objed.el
@@ -194,8 +194,6 @@ function should return nil if objed should not initialize."
(scroll-up-command . line)
(scroll-down-command . line)
(move-to-window-line-top-bottom . line)
- (xref-find-definitions . line)
- (xref-pop-marker-stack . line)
(imenu . line)
(backward-paragraph . paragraph)
(forward-paragraph . paragraph)
@@ -241,8 +239,11 @@ function should return nil if objed should not initialize."
(yank-pop . region)
;; misc
(which-key-C-h-dispatch . char)
- (switch-to-buffer . char)
(find-file . char)
+ ;; keep object of buffer if available...
+ (switch-to-buffer . nil)
+ (xref-find-definitions . nil)
+ (xref-pop-marker-stack . nil)
)
"Entry commands and associated objects."
:group 'objed
@@ -400,6 +401,7 @@ To avoid loading `avy' set this var before activating
`objed-mode.'"
(declare-function edit-indirect-commit "ext:edit-indirect")
(declare-function electric-pair-syntax-info "ext:elec-pair")
(declare-function hl-line-unhighlight "ext:hl-line")
+(declare-function hl-line-highlight "ext:hl-line")
@@ -1274,7 +1276,13 @@ or object position data."
(objed--switch-to-object-for-cmd sym))
((symbolp sym)
(objed--switch-to sym))
- (t (objed--update-current-object 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
@@ -3183,13 +3191,13 @@ on and RANGE hold the object position data."
(objed--exit-objed))
(defun objed--check-buffer ()
- "Check if current buffer is still the `objed-buffer'.
+ "Check if current buffer is still the `objed--buffer'.
Resets objed if appropriate."
(unless objed--with-allow-input
(when (not (eq (current-buffer) objed--buffer))
(objed--reset--objed-buffer)
- (select-window (get-buffer-window (current-buffer)))
+ (select-window (get-buffer-window (current-buffer)) t)
(objed--init (or objed--object 'char)))))
(defun objed--reset--objed-buffer ()
- [elpa] externals/objed 4cb9beb 21/21: Version bump, (continued)
- [elpa] externals/objed 4cb9beb 21/21: Version bump, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed 9689c72 17/21: Reinit after raise, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed 85941b8 16/21: Add objed-execute command, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed 4bb1b90 12/21: Add url object, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed 7627082 13/21: Don't ignore search errors, error with not other object found msg., Clemens Radermacher, 2019/03/17
- [elpa] externals/objed 998563a 06/21: Remove redundant :group declarations, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed e9bf605 07/21: Refactor objec-replace, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed 85019a8 14/21: Add raise command, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed c9b7c2a 05/21: Fix var not defined for edit-indirect, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed 2274a94 02/21: Add package-lint to linting tests, and fix its errors/warnings, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed 6ea0268 01/21: Buffer switch: Keep objed--object if possible, and update highlight,
Clemens Radermacher <=
- [elpa] externals/objed 1054cd8 03/21: Compile tests like elpa does, and fix the compile errors in tests, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed f5cc1ce 15/21: Remove binding for disfunct objed repeat, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed bb5d097 11/21: Improve file object, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed 96d5bc9 10/21: Add mail object, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed cc6c36f 08/21: Derive package name from current dir, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed be0cd7c 09/21: Fix identifier immediate jumping if used as last command, Clemens Radermacher, 2019/03/17
- [elpa] externals/objed 5a52e13 04/21: Remove load message, Clemens Radermacher, 2019/03/17