bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Noam Postavsky
Subject: bug#31696: 27.0.50; dotimes-with-progress-reporter: Polimorphic 2nd argument
Date: Sun, 03 Jun 2018 10:02:54 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Tino Calancha <address@hidden> 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'.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]