[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24959: 26.0.50; cancel-timer: void-variable timer
From: |
Lars Ingebrigtsen |
Subject: |
bug#24959: 26.0.50; cancel-timer: void-variable timer |
Date: |
Thu, 17 Nov 2016 20:22:06 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
Oleg Sivokon <oleg.sivokon@elastifile.com> writes:
> (defun tesla-do-containers (command &optional need-refresh output)
> (let (temp-buffs timer)
[...]
> (setq timer
> (run-at-time
> 1 1
> (lambda (output buffs)
[...]
> (cancel-timer timer))
This can't work. You're setting a locally bound variable, and then
you're running the lambda in a different context afterwards.
Start using lexical bindings, and it'll work.
In any case, this doesn't look like an Emacs bug, and I'm closing this
bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- bug#24959: 26.0.50; cancel-timer: void-variable timer, (continued)
- bug#24959: 26.0.50; cancel-timer: void-variable timer, Eli Zaretskii, 2016/11/17
- bug#24959: 26.0.50; cancel-timer: void-variable timer, Lars Ingebrigtsen, 2016/11/17
- bug#24959: 26.0.50; cancel-timer: void-variable timer, Oleg Sivokon, 2016/11/17
- bug#24959: 26.0.50; cancel-timer: void-variable timer, Lars Ingebrigtsen, 2016/11/17
- bug#24959: 26.0.50; cancel-timer: void-variable timer, Oleg Sivokon, 2016/11/17
- bug#24959: 26.0.50; cancel-timer: void-variable timer, Lars Ingebrigtsen, 2016/11/17
- bug#24959: 26.0.50; cancel-timer: void-variable timer, Oleg Sivokon, 2016/11/17
- bug#24959: 26.0.50; cancel-timer: void-variable timer, Lars Ingebrigtsen, 2016/11/17
- bug#24959: 26.0.50; cancel-timer: void-variable timer, Oleg Sivokon, 2016/11/17
- bug#24959: 26.0.50; cancel-timer: void-variable timer, Oleg Sivokon, 2016/11/17
- bug#24959: 26.0.50; cancel-timer: void-variable timer,
Lars Ingebrigtsen <=
- bug#24959: 26.0.50; cancel-timer: void-variable timer, Oleg Sivokon, 2016/11/17