branch: externals/gnugo commit b145596924334e2516ca50d2cd747804fd56d498 Author: Paul Eggert <egg...@cs.ucla.edu> Commit: Paul Eggert <egg...@cs.ucla.edu>
Port scoring-seed code to future Emacs * packages/gnugo/gnugo.el (gnugo-close-game): Don’t assume Emacs internal timestamp format, as it is planned to change in future versions. --- gnugo.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gnugo.el b/gnugo.el index 5dbc06a..dd5baea 100644 --- a/gnugo.el +++ b/gnugo.el @@ -849,9 +849,11 @@ For all other values of RSEL, do nothing and return nil." (defun gnugo-close-game (end-time resign) (gnugo-put :game-end-time end-time) - (let ((now (or end-time (current-time)))) - (gnugo-put :scoring-seed (logior (ash (logand (car now) 255) 16) - (cadr now)))) + (gnugo-put :scoring-seed + (if (fboundp 'time-convert) + (logand (time-convert end-time 'integer) #xffffff) + (let ((now (or end-time (current-time)))) + (logior (ash (logand (car now) 255) 16) (cadr now))))) (gnugo-put :game-over (cl-flet ;; Q: What form does a game-over "group" take?