diff options
| -rw-r--r-- | lisp/timer.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/timer.el b/lisp/timer.el index 68a9e105dae..f60763c2f68 100644 --- a/lisp/timer.el +++ b/lisp/timer.el | |||
| @@ -264,10 +264,6 @@ This function is called, by name, directly by the C code." | |||
| 264 | (progn | 264 | (progn |
| 265 | ;; Delete from queue. | 265 | ;; Delete from queue. |
| 266 | (cancel-timer timer) | 266 | (cancel-timer timer) |
| 267 | ;; Run handler | ||
| 268 | (condition-case nil | ||
| 269 | (apply (aref timer 5) (aref timer 6)) | ||
| 270 | (error nil)) | ||
| 271 | ;; Re-schedule if requested. | 267 | ;; Re-schedule if requested. |
| 272 | (if (aref timer 4) | 268 | (if (aref timer 4) |
| 273 | (if (aref timer 7) | 269 | (if (aref timer 7) |
| @@ -282,7 +278,13 @@ This function is called, by name, directly by the C code." | |||
| 282 | (aref timer 4)))) | 278 | (aref timer 4)))) |
| 283 | (if (> repeats timer-max-repeats) | 279 | (if (> repeats timer-max-repeats) |
| 284 | (timer-inc-time timer (* (aref timer 4) repeats))))) | 280 | (timer-inc-time timer (* (aref timer 4) repeats))))) |
| 285 | (timer-activate timer)))) | 281 | (timer-activate timer))) |
| 282 | ;; Run handler. | ||
| 283 | ;; We do this after rescheduling so that the handler function | ||
| 284 | ;; can cancel its own timer successfully with cancel-timer. | ||
| 285 | (condition-case nil | ||
| 286 | (apply (aref timer 5) (aref timer 6)) | ||
| 287 | (error nil))) | ||
| 286 | (error "Bogus timer event")))) | 288 | (error "Bogus timer event")))) |
| 287 | 289 | ||
| 288 | ;; This function is incompatible with the one in levents.el. | 290 | ;; This function is incompatible with the one in levents.el. |