[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/pulsar a335e52505 03/28: Add commands to pulse+recenter
From: |
ELPA Syncer |
Subject: |
[elpa] externals/pulsar a335e52505 03/28: Add commands to pulse+recenter |
Date: |
Tue, 22 Mar 2022 06:58:01 -0400 (EDT) |
branch: externals/pulsar
commit a335e525056c1f26f4bef65b0a236ba920de670f
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Add commands to pulse+recenter
---
pulsar.el | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/pulsar.el b/pulsar.el
index 04711e1fd4..0f040ef508 100644
--- a/pulsar.el
+++ b/pulsar.el
@@ -237,5 +237,33 @@ sets up the aforementioned hook."
(advice-add fn :after #'pulsar--add-hook))
(add-hook 'pulsar-after-function-hook #'pulsar-pulse-line))))
+;;;; Recentering commands
+
+(defmacro pulsar-recenter (name doc arg)
+ "Produce command to pulse and recenter.
+The symbol is NAME, DOC for the doc string, and ARG is passed to
+`recenter'."
+ (declare (indent defun))
+ `(defun ,name ()
+ ,doc
+ (interactive)
+ (recenter ,arg)
+ (pulsar-pulse-line)))
+
+(pulsar-recenter
+ pulsar-recenter-top
+ "Reposition point at the top of the window and pulse line."
+ 0)
+
+(pulsar-recenter
+ pulsar-recenter-bottom
+ "Reposition point at the bottom of the window and pulse line."
+ -1)
+
+(pulsar-recenter
+ pulsar-recenter-middle
+ "Reposition point at the center of the window and pulse line."
+ nil)
+
(provide 'pulsar)
;;; pulsar.el ends here
- [elpa] branch externals/pulsar created (now 40b1aa8c48), ELPA Syncer, 2022/03/22
- [elpa] externals/pulsar 7a17c1ab55 01/28: Add pulsar.el, ELPA Syncer, 2022/03/22
- [elpa] externals/pulsar e0ae86378f 06/28: Remove recentering at bottom, ELPA Syncer, 2022/03/22
- [elpa] externals/pulsar a335e52505 03/28: Add commands to pulse+recenter,
ELPA Syncer <=
- [elpa] externals/pulsar 0cc2f4af56 02/28: Make outline structure more detailed, ELPA Syncer, 2022/03/22
- [elpa] externals/pulsar de1fa21ae3 05/28: Refine pulsar-reveal-entry, ELPA Syncer, 2022/03/22
- [elpa] externals/pulsar 4748f55eee 08/28: Expand the pulsar-pulse-functions, ELPA Syncer, 2022/03/22
- [elpa] externals/pulsar a84b2d86f1 10/28: Document integration with other packages, ELPA Syncer, 2022/03/22
- [elpa] externals/pulsar a7b7ac4f7e 11/28: Document pulse-setup, ELPA Syncer, 2022/03/22
- [elpa] externals/pulsar 23a8ef7fbf 13/28: Release version 0.1.0, ELPA Syncer, 2022/03/22
- [elpa] externals/pulsar 54702c9e1f 12/28: Add package keywords, ELPA Syncer, 2022/03/22
- [elpa] externals/pulsar bc084499c4 04/28: Add function to reveal Org or Outline entry, ELPA Syncer, 2022/03/22
- [elpa] externals/pulsar 98d970dcdf 09/28: Add minor rewording, ELPA Syncer, 2022/03/22
- [elpa] externals/pulsar fca0e53815 15/28: Exert control over the pulse effect, ELPA Syncer, 2022/03/22