From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#31696: 27.0.50; dotimes-with-progress-reporter: Polimorphic 2nd argument Date: Sun, 03 Jun 2018 10:02:54 -0400 Message-ID: <87sh647ysx.fsf@gmail.com> References: <874lik57ub.fsf@gmail.com> <87vab07zu2.fsf@gmail.com> <87y3fw3rmh.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1528034528 23008 195.159.176.226 (3 Jun 2018 14:02:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 3 Jun 2018 14:02:08 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: 31696@debbugs.gnu.org, stefan monnier To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 03 16:02:03 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPTa7-0005sY-4R for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Jun 2018 16:02:03 +0200 Original-Received: from localhost ([::1]:35425 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPTcD-0002YL-Si for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Jun 2018 10:04:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPTc6-0002YB-Pw for bug-gnu-emacs@gnu.org; Sun, 03 Jun 2018 10:04:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPTc2-0006IG-Mn for bug-gnu-emacs@gnu.org; Sun, 03 Jun 2018 10:04:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52518) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPTc2-0006IA-Jh for bug-gnu-emacs@gnu.org; Sun, 03 Jun 2018 10:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fPTc2-0006cn-9w for bug-gnu-emacs@gnu.org; Sun, 03 Jun 2018 10:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Jun 2018 14:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31696 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31696-submit@debbugs.gnu.org id=B31696.152803458325399 (code B ref 31696); Sun, 03 Jun 2018 14:04:02 +0000 Original-Received: (at 31696) by debbugs.gnu.org; 3 Jun 2018 14:03:03 +0000 Original-Received: from localhost ([127.0.0.1]:60415 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPTb5-0006bb-7M for submit@debbugs.gnu.org; Sun, 03 Jun 2018 10:03:03 -0400 Original-Received: from mail-io0-f172.google.com ([209.85.223.172]:35394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPTb3-0006b5-Sf for 31696@debbugs.gnu.org; Sun, 03 Jun 2018 10:03:02 -0400 Original-Received: by mail-io0-f172.google.com with SMTP id u4-v6so11277420iof.2 for <31696@debbugs.gnu.org>; Sun, 03 Jun 2018 07:03:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=kkaRl7GGswu8wQiLKawBBJqQkmtrTNJffoOyWQUSnjs=; b=kzu9+0LvmVMsu7AoGr5XYuYuQuL7N7FYiqdamDAWlTqAdkco3rE2wshPLkzAL4X8yv s+hgDIlycn+3hY0EyqGCBeyrSiRAg9AwotYlfxi/Lool8+gjzBrq8Eie258Rk3FvPxXK URMESgAG7TSxdeSk2mKZtzAMakeVYM6VcyA2kMTBcexv6Tw8oLUNb0ARo90hkcJUHigO VBvD8N99/W+TnriQlINYWC6z02eXS+NzSoVNYTTiFfWk5/xZN+oTZw/2dfN5Py0cj6p+ szLHqzXLvNJKMTjV7pT2q+imYuK8z1MCoxg2wekrVN5XLVe1SfQUqYbaX44tBz365MMS yjDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=kkaRl7GGswu8wQiLKawBBJqQkmtrTNJffoOyWQUSnjs=; b=p0LYBeCoVEeGGDiDmrpceXHUJ61cogRdm4DOArKf7IQnw2l0/D6rtlqEdHuXjS/wl5 X5d8J2+m8Qi17l3dxF+ywkmJZE7PhoLDHk7g8t/ZsmH4k5moTrRlBkZEbT7s7+f32GQY 0YkdDMJ/CrpJClZRPMRg4TPLlaO9qSLPS2cKC+8m1vitIfXPsa9RUX0hYp9OX8JzvNh6 QcCmhPGknOokzMpZ+dNJUdqvM9ZGJEU1jpk8cGsLgSug8MdIgTqaWNX910qS1dR1VrJJ gI4g7MUwhBMnKODSRnwtoMht3w1vLgmvLYtAc1JYEg/5WQmbbTJF9vWRwVrAnfjEGpub E4MQ== X-Gm-Message-State: APt69E1GGvYZ8qFBZ+TwoZYUvdwcTxtKp9pol9yakx1nU8jkxCZQmTiU 9AimaJRyxTP3guVRposR2cs= X-Google-Smtp-Source: ADUXVKLi8tFcZDqghq+Z0BR+tcZ1LFdlAnqA0jYNmiosG9+azG4YEEd734YDTO0nJUSUqeLRgyG2Zw== X-Received: by 2002:a6b:150:: with SMTP id 77-v6mr16503528iob.138.1528034576377; Sun, 03 Jun 2018 07:02:56 -0700 (PDT) Original-Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id p20-v6sm1542375itf.4.2018.06.03.07.02.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 03 Jun 2018 07:02:55 -0700 (PDT) In-Reply-To: <87y3fw3rmh.fsf@gmail.com> (Tino Calancha's message of "Sun, 03 Jun 2018 22:51:34 +0900") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:146905 Archived-At: Tino Calancha 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'.