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

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

[elpa] externals/greader 6da434b5ba 1/4: greader-continuous-mode: modifi


From: ELPA Syncer
Subject: [elpa] externals/greader 6da434b5ba 1/4: greader-continuous-mode: modified.
Date: Fri, 17 Nov 2023 03:58:04 -0500 (EST)

branch: externals/greader
commit 6da434b5ba765acebee0219658de51d158b0be8c
Author: Michelangelo Rodriguez <michelangelo.rodriguez@gmail.com>
Commit: Michelangelo Rodriguez <michelangelo.rodriguez@gmail.com>

    greader-continuous-mode: modified.
    
    In this version, "greader-continuous-mode" actually turns on
    only if it can determine the scrolling function, otherwise
    generates an error informing the user and asking to configure the
    variable `greader-continuous-modes'.
---
 greader.el | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/greader.el b/greader.el
index 00f0e44246..4ea0a01f60 100644
--- a/greader.el
+++ b/greader.el
@@ -1578,11 +1578,20 @@ When this minor-mode is active, say in `info-mode', it 
will be
 called the `info-scroll-up' function instead of finishing reading."
   :lighter " continuous"
   (if greader-continuous-mode
-      (add-hook 'greader-before-finish-functions
-               #'greader-continuous-call-function 0 t)
+      (progn
+       (unless (greader-continuous-guess-function)
+         (let ((error-string
+                (concat
+                 "I can't determine the function for
+scroll in " (symbol-name major-mode) ".\nPlease add
+this major mode to the variable `greader-continuous-modes'")))
+           (greader-continuous-mode -1)
+           (user-error "%s" error-string)))
+       (add-hook 'greader-before-finish-functions
+                 #'greader-continuous-call-function 0 t))
     (remove-hook 'greader-before-finish-functions
                 #'greader-continuous-call-function t)))
-    
+
 
 (provide 'greader)
 ;;; greader.el ends here



reply via email to

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