• Eli Zaretskii's avatar
    Fix bugs #12447 and #12326 with infloop causes by idle timers, update docs. · df9685f3
    Eli Zaretskii authored
     src/keyboard.c (timer_check_2): Move calculation of 'timers' and
     'idle_timers' from here ...
     (timer_check): ... to here.  Use Fcopy_sequence to copy the timer
     lists, to avoid infloops when the timer does something stupid,
     like reinvoke itself with the same or smaller time-out.
    
     lisp/emacs-lisp/timer.el (run-with-idle-timer)
     (timer-activate-when-idle): Warn against reinvoking an idle timer
     from within its own timer action.
    
     doc/lispref/os.texi (Idle Timers): Warn against reinvoking an idle timer
     from within its own timer action.
    df9685f3
timer.el 20.3 KB