[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/pulsar 5e5796ecd5 02/10: Make pulsar--start also return
From: |
ELPA Syncer |
Subject: |
[elpa] externals/pulsar 5e5796ecd5 02/10: Make pulsar--start also return point-min in the minibuffer |
Date: |
Sat, 12 Aug 2023 03:58:37 -0400 (EDT) |
branch: externals/pulsar
commit 5e5796ecd5e1944541c21e77ca3b21f0c752df15
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Make pulsar--start also return point-min in the minibuffer
The idea is to set up something like the following and have it
produce a pulse over the text of the prompt:
(add-hook 'minibuffer-setup-hook 'pulsar-pulse-line-blue)
---
pulsar.el | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/pulsar.el b/pulsar.el
index 4fe5195d57..2ce177bd9f 100644
--- a/pulsar.el
+++ b/pulsar.el
@@ -252,10 +252,18 @@ pulse. Only applies when `pulsar-pulse' is non-nil."
(or (eobp) (eq (point) (point-max)))))
(defun pulsar--start ()
- "Return appropriate line start."
- (if (and (pulsar--buffer-end-p) (eq (char-before) ?\n))
- (line-beginning-position 0)
- (line-beginning-position)))
+ "Return appropriate line start.
+When in the minibuffer, return the `point-min', which includes
+the text of the prompt. This way, a pulse will be visible even
+if the minibuffer has no initial text (e.g. `M-x' with the
+default completion setup)."
+ (cond
+ ((minibufferp)
+ (point-min))
+ ((and (pulsar--buffer-end-p) (eq (char-before) ?\n))
+ (line-beginning-position 0))
+ (t
+ (line-beginning-position))))
(defun pulsar--end ()
"Return appropriate line end."
- [elpa] externals/pulsar updated (aa09693018 -> 1af423199d), ELPA Syncer, 2023/08/12
- [elpa] externals/pulsar 373c5f7955 03/10: Note that next version shall be 1.0.0, ELPA Syncer, 2023/08/12
- [elpa] externals/pulsar 5e5796ecd5 02/10: Make pulsar--start also return point-min in the minibuffer,
ELPA Syncer <=
- [elpa] externals/pulsar 61ceda6812 08/10: Add missing backronym, ELPA Syncer, 2023/08/12
- [elpa] externals/pulsar b80af461be 09/10: Fix docstring of 'pulsar-recenter-middle' defalias, ELPA Syncer, 2023/08/12
- [elpa] externals/pulsar 9e54e24aa9 04/10: Use more precise markup for 'pulsar' symbol in the manual, ELPA Syncer, 2023/08/12
- [elpa] externals/pulsar 206eece04d 07/10: Add missing metadata to CHANGELOG, ELPA Syncer, 2023/08/12
- [elpa] externals/pulsar e2c077034e 01/10: Simplify the macro that defines pulsar-pulse-line-COLOR functions, ELPA Syncer, 2023/08/12
- [elpa] externals/pulsar 823969a6e8 05/10: Document how to use pulsar in the minibuffer, ELPA Syncer, 2023/08/12
- [elpa] externals/pulsar 1af423199d 10/10: Update to version 1.0.0, ELPA Syncer, 2023/08/12
- [elpa] externals/pulsar 08b6936e0c 06/10: Add missing metadata about user option versions, ELPA Syncer, 2023/08/12