[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/pulsar 0891269ff8 26/28: Add pulsar-highlight-face user
From: |
ELPA Syncer |
Subject: |
[elpa] externals/pulsar 0891269ff8 26/28: Add pulsar-highlight-face user option |
Date: |
Tue, 22 Mar 2022 06:58:06 -0400 (EDT) |
branch: externals/pulsar
commit 0891269ff813917c6959e5d0e2f7f7ec4400481d
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Add pulsar-highlight-face user option
Thanks to Mark Barton for the feedback in issue 3:
<https://gitlab.com/protesilaos/pulsar/-/issues/3>.
---
README.org | 7 +++++++
pulsar.el | 27 ++++++++++++++++++++++++---
2 files changed, 31 insertions(+), 3 deletions(-)
diff --git a/README.org b/README.org
index 3fdf377329..c42a16b309 100644
--- a/README.org
+++ b/README.org
@@ -99,6 +99,12 @@ will pulse before fading away. Whereas the
~pulsar-highlight-line~
command never pulses the line: the highlight stays in place as if
~pulsar-pulse~ is nil.
+#+vindex: pulsar-highlight-face
+To help users differentiate between the momentary pulse and transient
+highlight effects, the user option ~pulsar-highlight-face~ controls the
+presentation of the ~pulsar-highlight-line~ command. By default, this
+that variable is the same as ~pulsar-face~.
+
Pulsar depends on the built-in ~pulse.el~ library.
Why the name "pulsar"? It sounds like "pulse" and is a recognisable
@@ -193,6 +199,7 @@ Remember to read the doc string of each of these variables.
(setq pulsar-delay 0.055)
(setq pulsar-iterations 10)
(setq pulsar-face 'pulsar-magenta)
+(setq pulsar-highlight-face 'pulsar-yellow)
;; pulsar does not define any key bindings. This is just a sample that
;; respects the key binding conventions. Evaluate:
diff --git a/pulsar.el b/pulsar.el
index a08bb701bc..3c2e0c6137 100644
--- a/pulsar.el
+++ b/pulsar.el
@@ -39,6 +39,11 @@
;; To pulse highlight the current line on demand, use
;; `pulsar-pulse-line'. To highlight the current line without pulsing
;; it, use `pulsar-highlight-line' instead.
+;;
+;; To help users differentiate between the momentary pulse and transient
+;; highlight effects, the user option `pulsar-highlight-face' controls
+;; the presentation of the `pulsar-highlight-line' command. By default,
+;; this that variable is the same as `pulsar-face'.
;;
;; Pulsar depends on the built-in `pulse.el' library.
;;
@@ -107,7 +112,7 @@ such as `customize-set-variable' do that automatically."
:group 'pulsar)
(defcustom pulsar-face 'pulsar-generic
- "Face to use for the pulse line.
+ "Face of the regular pulse line effect (`pulsar-pulse-line').
The default is `pulsar-generic' which reuses the standard face
from the underlying pulse library. Users can select one among
`pulsar-red', `pulsar-green', `pulsar-yellow', `pulsar-blue',
@@ -123,6 +128,19 @@ background attribute."
(face :tag "Other face (must have a background)"))
:group 'pulsar)
+(defcustom pulsar-highlight-face 'pulsar-face
+ "Face used in `pulsar-highlight-line'."
+ :type '(choice (variable pulsar-face)
+ (radio (face :tag "Generic pulse.el face" pulsar-generic)
+ (face :tag "Red style" pulsar-red)
+ (face :tag "Green style" pulsar-green)
+ (face :tag "Yellow style" pulsar-yellow)
+ (face :tag "Blue style" pulsar-blue)
+ (face :tag "Magenta style" pulsar-magenta)
+ (face :tag "Cyan style" pulsar-cyan)
+ (face :tag "Other face (must have a background)")))
+ :group 'pulsar)
+
(defcustom pulsar-pulse t
"When non-nil enable pulsing.
Otherwise the highlight stays on the current line until another
@@ -269,9 +287,12 @@ pulse effect."
(defun pulsar-highlight-line ()
"Temporarily highlight the current line.
Unlike `pulsar-pulse-line', never pulse the current line. Keep
-the highlight in place until another command is invoked."
+the highlight in place until another command is invoked.
+
+Use `pulsar-highlight-face' (it is the same as `pulsar-face' by
+default)."
(interactive)
- (pulsar--pulse :no-pulse))
+ (pulsar--pulse :no-pulse pulsar-highlight-face))
;;;; Advice setup
- [elpa] externals/pulsar 82946880b5 14/28: Add missing function to sample package setup, (continued)
- [elpa] externals/pulsar 82946880b5 14/28: Add missing function to sample package setup, ELPA Syncer, 2022/03/22
- [elpa] externals/pulsar 42f8a03b8a 18/28: Fix typo, ELPA Syncer, 2022/03/22
- [elpa] externals/pulsar d654e552f0 19/28: Clarify doc strings of user options, ELPA Syncer, 2022/03/22
- [elpa] externals/pulsar 4cfc18a009 22/28: Update to version 0.2.0, ELPA Syncer, 2022/03/22
- [elpa] externals/pulsar d2174307b0 23/28: Simple fix for highlight behavior on last line, ELPA Syncer, 2022/03/22
- [elpa] externals/pulsar 2d666c7061 25/28: Update "Acknowledgements" in the manual, ELPA Syncer, 2022/03/22
- [elpa] externals/pulsar 1535551ac0 27/28: Use post-command-hook instead of an advice, ELPA Syncer, 2022/03/22
- [elpa] externals/pulsar 1b73a123f1 21/28: Reword Commentary and package description, ELPA Syncer, 2022/03/22
- [elpa] externals/pulsar b469abdd94 17/28: Abstract pulse effect; add pulsar-highlight-line, ELPA Syncer, 2022/03/22
- [elpa] externals/pulsar 890d73e481 24/28: Merge branch 'fix-last-line' into 'main', ELPA Syncer, 2022/03/22
- [elpa] externals/pulsar 0891269ff8 26/28: Add pulsar-highlight-face user option,
ELPA Syncer <=
- [elpa] externals/pulsar ebbe9486d1 20/28: Reword manual's description, ELPA Syncer, 2022/03/22
- [elpa] externals/pulsar 40b1aa8c48 28/28: Document pulsar package installation, ELPA Syncer, 2022/03/22