Don't hard code the default x-show-tip timeout
* src/xfns.c (Fx_show_tip): Use it. (syms_of_xfns): Add a new x-show-tooltip-timeout variable (bug#23341).
This commit is contained in:
parent
b05a103ea7
commit
86b6a69f86
2 changed files with 13 additions and 4 deletions
6
etc/NEWS
6
etc/NEWS
|
@ -1529,6 +1529,12 @@ functions.
|
|||
|
||||
* Lisp Changes in Emacs 29.1
|
||||
|
||||
---
|
||||
** 'x-show-tip' no longer hard-codes a timeout default.
|
||||
The new 'x-show-tooltip-timeout' variable allows the user to alter
|
||||
this for packages that don't use 'tooltip-show', but instead calls the
|
||||
lower level function directly.
|
||||
|
||||
+++
|
||||
** New function 'window-max-characters-per-line'.
|
||||
|
||||
|
|
11
src/xfns.c
11
src/xfns.c
|
@ -8292,7 +8292,7 @@ PARMS is an optional list of frame parameters which can be used to
|
|||
change the tooltip's appearance.
|
||||
|
||||
Automatically hide the tooltip after TIMEOUT seconds. TIMEOUT nil
|
||||
means use the default timeout of 5 seconds.
|
||||
means use the default timeout from the `x-show-tooltip-timeout'.
|
||||
|
||||
If the list of frame parameters PARMS contains a `left' parameter,
|
||||
display the tooltip at that x-position. If the list of frame parameters
|
||||
|
@ -8338,9 +8338,8 @@ Text larger than the specified size is clipped. */)
|
|||
f = decode_window_system_frame (frame);
|
||||
|
||||
if (NILP (timeout))
|
||||
timeout = make_fixnum (5);
|
||||
else
|
||||
CHECK_FIXNAT (timeout);
|
||||
timeout = Vx_show_tooltip_timeout;
|
||||
CHECK_FIXNAT (timeout);
|
||||
|
||||
if (NILP (dx))
|
||||
dx = make_fixnum (5);
|
||||
|
@ -9727,6 +9726,10 @@ eliminated in future versions of Emacs. */);
|
|||
}
|
||||
#endif
|
||||
|
||||
DEFVAR_LISP ("x-show-tooltip-timeout", Vx_show_tooltip_timeout,
|
||||
doc: /* The default timeout (in seconds) for `x-show-tip'. */);
|
||||
Vx_show_tooltip_timeout = make_fixnum (5);
|
||||
|
||||
/* X window properties. */
|
||||
defsubr (&Sx_change_window_property);
|
||||
defsubr (&Sx_delete_window_property);
|
||||
|
|
Loading…
Add table
Reference in a new issue