branch: externals/hyperbole commit 3785c5dbcd3ca8bc0e7247cc59d5ca1c9b1190ad Author: Mats Lidell <mats.lid...@lidells.se> Commit: GitHub <nore...@github.com>
Use new variable for the flash time to avoid old customization (#22) --- ChangeLog | 5 +++++ hui-em-but.el | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index fe2e2a2..4b43e31 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2021-05-05 Mats Lidell <ma...@gnu.org> + +* hui-em-but.el (hproperty:but-flash-time): Mark hproperty:but-flash as obsolete. + (hproperty:but-flash-time-seconds): Add customized flash time based on seconds. + 2021-05-04 Bob Weiner <r...@gnu.org> * man/hyperbole.texi (Manual Stable Release Installation): Add this diff --git a/hui-em-but.el b/hui-em-but.el index e9fb43b..fe526e5 100644 --- a/hui-em-but.el +++ b/hui-em-but.el @@ -47,6 +47,12 @@ "*Emacs button flash delay." :type '(integer :match (lambda (_widget value) (and (integerp value) (> value 0)))) :group 'hyperbole-buttons) +(make-obsolete-variable 'hproperty:but-flash-time "Use `hproperty:but-flash-time-seconds' instead" "8.0") + +(defcustom hproperty:but-flash-time-seconds 0.05 + "*Emacs button flash delay." + :type 'float + :group 'hyperbole-buttons) (defface hbut-flash '((((class color) (min-colors 88) (background light)) @@ -256,7 +262,7 @@ highlighted." (unwind-protect (progn (hproperty:set-but-face start hproperty:flash-face) - (sit-for (/ hproperty:but-flash-time 5000.0))) ;; Force display update + (sit-for hproperty:but-flash-time-seconds)) ;; Force display update (hproperty:set-but-face start a) (redisplay t))) (and ibut (not prev) (hproperty:but-delete start))))