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

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

[elpa] externals/logos 69cabed870 09/25: Run hook after page motion


From: ELPA Syncer
Subject: [elpa] externals/logos 69cabed870 09/25: Run hook after page motion
Date: Fri, 11 Mar 2022 08:58:00 -0500 (EST)

branch: externals/logos
commit 69cabed87033931c6a71da9231dd17c7ffa947e9
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Run hook after page motion
---
 logos.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/logos.el b/logos.el
index 326264b802..6ec38b422c 100644
--- a/logos.el
+++ b/logos.el
@@ -160,6 +160,10 @@ This is only relevant when `logos-focus-mode' is enabled."
   ;; Avoids the problem of skipping pages while cycling back and forth.
   (goto-char (point-min)))
 
+(defvar logos-page-motion-hook nil
+  "Hook that runs after a page motion.
+See `logos-forward-page-dwim' or `logos-backward-page-dwim'.")
+
 (defun logos--page-motion (&optional count back)
   "Routine for page motions.
 With optional numeric COUNT move by that many pages.  With
@@ -169,7 +173,8 @@ optional BACK perform the motion backwards."
     (if (buffer-narrowed-p)
         (logos--narrow-to-page count back)
       (funcall cmd count)
-      (setq this-command cmd))))
+      (setq this-command cmd))
+    (run-hooks 'logos-page-motion-hook)))
 
 ;;;###autoload
 (defun logos-forward-page-dwim (&optional count)



reply via email to

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