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

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

[nongnu] elpa/dslide 1fb1a599b7 074/230: Ensure buffer before running fo


From: ELPA Syncer
Subject: [nongnu] elpa/dslide 1fb1a599b7 074/230: Ensure buffer before running forward and backward commands
Date: Sun, 7 Jul 2024 19:00:17 -0400 (EDT)

branch: elpa/dslide
commit 1fb1a599b79cd2e3cc08e60f78e0b517bbb147db
Author: Psionik K <73710933+psionic-k@users.noreply.github.com>
Commit: Psionik K <73710933+psionic-k@users.noreply.github.com>

    Ensure buffer before running forward and backward commands
    
    Signed-off-by: Psionik K <73710933+psionic-k@users.noreply.github.com>
---
 macro-slides.el | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/macro-slides.el b/macro-slides.el
index d6d3256854..8f7f5602b0 100644
--- a/macro-slides.el
+++ b/macro-slides.el
@@ -2560,16 +2560,11 @@ map.  It starts the mode if the mode is inactive."
            #'ms-display-slides))
       (ms-mode 1))))
 
-;; TODO forward and backward commands are usually only bound in the mode and
-;;shouldn't need to check for the deck being active
 ;;;###autoload
 (defun ms-forward ()
   "Advance slideshow forward."
   (interactive)
-  (unless ms-mode
-    (user-error "Macro Slide Mode inactive"))
-  (unless (ms-live-p)
-    (error "No deck is active"))
+  (ms--ensure-slide-buffer)
   (if (ms--showing-contents-p)
       (org-next-visible-heading 1)
     (ms--ensure-slide-buffer)
@@ -2579,10 +2574,7 @@ map.  It starts the mode if the mode is inactive."
 (defun ms-backward ()
   "Advance slideshow backward."
   (interactive)
-  (unless ms-mode
-    (user-error "Macro Slide Mode inactive"))
-  (unless (ms-live-p)
-    (error "No deck is active"))
+  (ms--ensure-slide-buffer)
   (if (ms--showing-contents-p)
       (org-previous-visible-heading 1)
     (ms--ensure-slide-buffer)



reply via email to

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