[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/focus f310fa1c31 52/82: Split up `focus-move-focus'
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/focus f310fa1c31 52/82: Split up `focus-move-focus' |
Date: |
Tue, 6 Sep 2022 04:58:57 -0400 (EDT) |
branch: elpa/focus
commit f310fa1c31f6cdc046c2e4f9bba7235cc10c0ccf
Author: Lars Tveito <larstvei@ifi.uio.no>
Commit: Lars Tveito <larstvei@ifi.uio.no>
Split up `focus-move-focus'
---
focus.el | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/focus.el b/focus.el
index 2670dbb47d..e53d2b19dc 100644
--- a/focus.el
+++ b/focus.el
@@ -138,14 +138,18 @@ argument."
(make-list foregrounds foreground)))))
(defun focus-move-focus ()
- "Move `focus-pre-overlay' and `focus-post-overlay'.
+ "Moves the focused section according to `focus-bounds'.
-If function `focus-mode' is enabled, this command fires after
-each command."
+If `focus-mode' is enabled, this command fires after each
+command."
(let* ((bounds (focus-bounds)))
(when bounds
- (move-overlay focus-pre-overlay (point-min) (car bounds))
- (move-overlay focus-post-overlay (cdr bounds) (point-max)))))
+ (focus-move-overlays (car bounds) (cdr bounds)))))
+
+(defun focus-move-overlays (low high)
+ "Move `focus-pre-overlay' and `focus-post-overlay'."
+ (move-overlay focus-pre-overlay (point-min) low)
+ (move-overlay focus-post-overlay high (point-max)))
(defun focus-init ()
"This function is run when command `focus-mode' is enabled.
- [nongnu] elpa/focus c89d08f510 24/82: Applied purcell's recommendations, (continued)
- [nongnu] elpa/focus c89d08f510 24/82: Applied purcell's recommendations, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 94ed8ab68b 36/82: Defined variables to help hide the cursor, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus e8c1eb5ce2 16/82: Added short commentary, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 75202c9445 58/82: Version bump, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 8028fc088f 04/82: Improved average color function, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus e9ab37b865 81/82: Improved user option types, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus aa5ea31118 65/82: Fixed package lint warnings., ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus a80b7b6eba 71/82: Add possibility of customizing the face of the focused region, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 1c664fb992 17/82: Added installation section, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus bf5fcff0d0 69/82: Allow setting a color for dimmed text. Fixes #21, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus f310fa1c31 52/82: Split up `focus-move-focus',
ELPA Syncer <=
- [nongnu] elpa/focus 5e483363ac 75/82: New README, ELPA Syncer, 2022/09/06
- [nongnu] elpa/focus 6b9620a73d 44/82: Added section on `focus-read-only-mode' in README, ELPA Syncer, 2022/09/06