Subject: bug#31696: 27.0.50; dotimes-with-progress-reporter: Polimorphic 2nd argument

From: Noam Postavsky <[email-masked]>
Date: Sun, 03 Jun 2018 10:02:54 -0400

Tino Calancha <[email-masked]> writes:

> +(defmacro dotimes-with-progress-reporter (spec reporter-or-message &rest body)

> +  (let ((prep (make-symbol "--dotimes-prep--"))
> +        ((end (make-symbol "--dotimes-end--"))))
> +    `(let ((,prep ,reporter-or-message)
> +           (,end ,(cadr spec)))
> +       (when (stringp ,prep)
> +         (setq ,prep (make-progress-reporter ,prep 0 ,end)))
> +       (dotimes ,spec

That's still going to evaluate (cadr spec) twice.  You need to change
the spec passed to `dotimes' so that it also uses `end'.