[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dslide 1eda39cbd0 3/7: When no slide action is present, ex
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dslide 1eda39cbd0 3/7: When no slide action is present, execute a forward step |
Date: |
Wed, 20 Nov 2024 18:59:35 -0500 (EST) |
branch: elpa/dslide
commit 1eda39cbd07da81039ba461a66374a3cad47b5b0
Author: Psionik K <73710933+psionic-k@users.noreply.github.com>
Commit: Psionik K <73710933+psionic-k@users.noreply.github.com>
When no slide action is present, execute a forward step
This prevents situations where the user calls forward and nothing happens.
---
dslide.el | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/dslide.el b/dslide.el
index 89186a903e..3fe75ce91a 100644
--- a/dslide.el
+++ b/dslide.el
@@ -901,18 +901,22 @@ the slide object coordinates this overlap. It delegates
the
order.")
(cl-defmethod dslide-begin ((obj dslide-slide))
- (prog1 (when-let ((slide-action (oref obj slide-action)))
- (dslide-begin slide-action))
- (mapc #'dslide-begin (oref obj section-actions))))
+ (let* ((slide-action (oref obj slide-action))
+ (progress (when slide-action (dslide-begin slide-action))))
+ (mapc #'dslide-begin (oref obj section-actions))
+ (if slide-action progress
+ (dslide-forward obj))))
(cl-defmethod dslide-end ((obj dslide-slide))
- (prog1 (when-let ((slide-action (oref obj slide-action)))
- (dslide-end slide-action))
+ (let* ((slide-action (oref obj slide-action))
+ (progress (dslide-end slide-action)))
;; Fairly certain the ordering of slide and section actions won't normally
;; matter for `dslide-end', but this ordering matches the situation that
would
;; occur if the user just called `dslide-forward' repeatedly, and we want
the
;; end state to be as close to "normal" as possible.
- (mapc #'dslide-end (reverse (oref obj section-actions)))))
+ (mapc #'dslide-end (oref obj section-actions))
+ (if slide-action progress
+ (dslide-backward obj))))
(cl-defmethod dslide-final ((obj dslide-slide))
;; The order that these are called shouldn't matter. No use case for
coupling
- [nongnu] elpa/dslide updated (4209916697 -> 92518d7978), ELPA Syncer, 2024/11/20
- [nongnu] elpa/dslide 0a4b2b81d8 4/7: Introducing Filtering, ELPA Syncer, 2024/11/20
- [nongnu] elpa/dslide 46ffb0114a 1/7: Header margins, ELPA Syncer, 2024/11/20
- [nongnu] elpa/dslide 8837fd12a4 2/7: Options to hide tags and todos, ELPA Syncer, 2024/11/20
- [nongnu] elpa/dslide 3d72e27609 5/7: line noise and cruft removal, ELPA Syncer, 2024/11/20
- [nongnu] elpa/dslide 1eda39cbd0 3/7: When no slide action is present, execute a forward step,
ELPA Syncer <=
- [nongnu] elpa/dslide ef9b7fe095 6/7: New Image Features!, ELPA Syncer, 2024/11/20
- [nongnu] elpa/dslide 92518d7978 7/7: introducing propertize action, ELPA Syncer, 2024/11/20