GNU bug report logs -
#24585
25.1; avoid hack in ggtags.el to run compilation-auto-jump timer
Previous Next
Reported by: Leo Liu <sdl.web <at> gmail.com>
Date: Sun, 2 Oct 2016 04:58:02 UTC
Severity: normal
Tags: moreinfo
Found in version 25.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> I think the hack in ggtags.el may be removed by the following patch to
> correct the said mistake:
IIUC this patch just changes the ordering for same-time timers.
Relying on either ordering is itself a hack. We need a better solution.
What are those two timers whose relative execution order matters?
Why do they care in which order they're run?
Stefan
> diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el
> index c01ea497..337e1049 100644
> --- a/lisp/emacs-lisp/timer.el
> +++ b/lisp/emacs-lisp/timer.el
> @@ -130,9 +130,9 @@ floating point number."
> (setq delta (time-add delta (list 0 0 (or usecs 0) (or psecs 0)))))
> (time-add time delta)))
> -(defun timer--time-less-p (t1 t2)
> +(defun timer--time-less-or-equal-p (t1 t2)
> "Say whether time value T1 is less than time value T2."
> - (time-less-p (timer--time t1) (timer--time t2)))
> + (not (time-less-p (timer--time t2) (timer--time t1))))
> (defun timer-inc-time (timer secs &optional usecs psecs)
> "Increment the time set in TIMER by SECS seconds, USECS microseconds,
> @@ -172,7 +172,7 @@ fire repeatedly that many seconds apart."
> (let ((timers (if idle timer-idle-list timer-list))
> last)
> ;; Skip all timers to trigger before the new one.
> - (while (and timers (timer--time-less-p (car timers) timer))
> + (while (and timers (timer--time-less-or-equal-p (car timers) timer))
> (setq last timers
> timers (cdr timers)))
> (if reuse-cell
This bug report was last modified 4 years and 227 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.