* Add :timeout for spacemacs|define-transient-state
This add a :timeout keyword for spacemacs|define-transient-state, it
make use of :timeout keyword defhydra according to
https://github.com/abo-abo/hydra/wiki/internals.
"The :timeout key starts a timer for the corresponding amount of seconds that disables the hydra. Calling any head will refresh the timer."
* Add idle for spacemacs|define-transient-state.
According to https://github.com/abo-abo/hydra/wiki/internals:
This key can delay the appearance of the hint.
Add :timeout and :idle in defhydra body to make it effect.
Add two new functions: `spacemacs/transient-state-register-add-bindings`
and `spacemacs/transient-state-register-remove-bindings` to prevent layer
authors and end users from dealing with the underlying variables' subtleties.
- New macro `spacemacs|transient-state-format-hint`
Additional hints can be formatted outside of the transient state macro.
This is a better separation of concern from an API point of view
because those hint are coupled to with the usage of :dynamic-hint
keyword. The transient state macro only need to know the entry point
for such dynamic hints, effectively increasing the readability of
transient state definition.
To be able to decouple the formatting of additional hints, a new
private variable whose name is given by the function
`spacemacs//transient-state-props-var-name` has been introduced.
An alternative would have been the save the whole transient state macro
props but a variable allows the cherry-pick only the values we really
need.
- Remove commented code about old variable
`spacemacs-transient-state-title-face`
- Remove unused keyword :entry-binding since it is not used. Given
the number and diversity of transient states in Spacemacs currently it
is a safe guess to remove this keyword for now. We can reintroduce it
later if really needed.
Add function that can be used to defer execution until after
dotspacemacs/user-config is run. If it has already been run the function
executes immediately.
Initially this is only used for deferring the definitions of
transient-states.