mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
(timer-event-handler): Reactivate timer first,
then run the handler function.
This commit is contained in:
parent
af56433dc5
commit
83ff83c08c
1 changed files with 7 additions and 5 deletions
|
|
@ -264,10 +264,6 @@ This function is called, by name, directly by the C code."
|
|||
(progn
|
||||
;; Delete from queue.
|
||||
(cancel-timer timer)
|
||||
;; Run handler
|
||||
(condition-case nil
|
||||
(apply (aref timer 5) (aref timer 6))
|
||||
(error nil))
|
||||
;; Re-schedule if requested.
|
||||
(if (aref timer 4)
|
||||
(if (aref timer 7)
|
||||
|
|
@ -282,7 +278,13 @@ This function is called, by name, directly by the C code."
|
|||
(aref timer 4))))
|
||||
(if (> repeats timer-max-repeats)
|
||||
(timer-inc-time timer (* (aref timer 4) repeats)))))
|
||||
(timer-activate timer))))
|
||||
(timer-activate timer)))
|
||||
;; Run handler.
|
||||
;; We do this after rescheduling so that the handler function
|
||||
;; can cancel its own timer successfully with cancel-timer.
|
||||
(condition-case nil
|
||||
(apply (aref timer 5) (aref timer 6))
|
||||
(error nil)))
|
||||
(error "Bogus timer event"))))
|
||||
|
||||
;; This function is incompatible with the one in levents.el.
|
||||
|
|
|
|||
Loading…
Reference in a new issue