aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2000-03-01 10:25:12 +0000
committerGerd Moellmann2000-03-01 10:25:12 +0000
commit3caa99d35d2096d094a183b7fea032bca9afd373 (patch)
tree90cc7196f3f6dd33138893e1c50943989879e3d3
parent50b1039fa7de644b62a1ebe38929bf16ec8e3b93 (diff)
downloademacs-3caa99d35d2096d094a183b7fea032bca9afd373.tar.gz
emacs-3caa99d35d2096d094a183b7fea032bca9afd373.zip
(start_busy_cursor): Allow floats for busy-cursor-delay.
-rw-r--r--src/xfns.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/xfns.c b/src/xfns.c
index e412cc568c6..d5e966ed6bc 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -10088,17 +10088,25 @@ void
10088start_busy_cursor () 10088start_busy_cursor ()
10089{ 10089{
10090 EMACS_TIME delay; 10090 EMACS_TIME delay;
10091 int secs; 10091 int secs, usecs = 0;
10092 10092
10093 cancel_busy_cursor (); 10093 cancel_busy_cursor ();
10094 10094
10095 if (INTEGERP (Vbusy_cursor_delay) 10095 if (INTEGERP (Vbusy_cursor_delay)
10096 && XINT (Vbusy_cursor_delay) > 0) 10096 && XINT (Vbusy_cursor_delay) > 0)
10097 secs = XFASTINT (Vbusy_cursor_delay); 10097 secs = XFASTINT (Vbusy_cursor_delay);
10098 else if (FLOATP (Vbusy_cursor_delay)
10099 && XFLOAT_DATA (Vbusy_cursor_delay) > 0)
10100 {
10101 Lisp_Object tem;
10102 tem = Ftruncate (Vbusy_cursor_delay, Qnil);
10103 secs = XFASTINT (tem);
10104 usecs = (XFLOAT_DATA (Vbusy_cursor_delay) - secs) * 1000000;
10105 }
10098 else 10106 else
10099 secs = DEFAULT_BUSY_CURSOR_DELAY; 10107 secs = DEFAULT_BUSY_CURSOR_DELAY;
10100 10108
10101 EMACS_SET_SECS_USECS (delay, secs, 0); 10109 EMACS_SET_SECS_USECS (delay, secs, usecs);
10102 busy_cursor_atimer = start_atimer (ATIMER_RELATIVE, delay, 10110 busy_cursor_atimer = start_atimer (ATIMER_RELATIVE, delay,
10103 show_busy_cursor, NULL); 10111 show_busy_cursor, NULL);
10104} 10112}
@@ -10994,7 +11002,7 @@ or when you set the mouse color.");
10994 11002
10995 DEFVAR_LISP ("busy-cursor-delay", &Vbusy_cursor_delay, 11003 DEFVAR_LISP ("busy-cursor-delay", &Vbusy_cursor_delay,
10996 "*Seconds to wait before displaying a busy-cursor.\n\ 11004 "*Seconds to wait before displaying a busy-cursor.\n\
10997Value must be an integer."); 11005Value must be an integer or float.");
10998 Vbusy_cursor_delay = make_number (DEFAULT_BUSY_CURSOR_DELAY); 11006 Vbusy_cursor_delay = make_number (DEFAULT_BUSY_CURSOR_DELAY);
10999 11007
11000#if 0 /* This doesn't really do anything. */ 11008#if 0 /* This doesn't really do anything. */