From unknown Thu Sep 11 06:33:38 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4631: 23.1; Warnings from repeat.el Reply-To: "Drew Adams" , 4631@debbugs.gnu.org Resent-From: "Drew Adams" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sun, 04 Oct 2009 15:00:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 4631 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125466797710971 (code B ref -1); Sun, 04 Oct 2009 15:00:04 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 4 Oct 2009 14:52:57 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.4 required=4.0 tests=AWL,FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n94EqtIQ010968 for ; Sun, 4 Oct 2009 07:52:57 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MuSSF-0004Je-D2 for bug-gnu-emacs@gnu.org; Sun, 04 Oct 2009 10:52:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MuSSA-0004H7-Ld for bug-gnu-emacs@gnu.org; Sun, 04 Oct 2009 10:52:54 -0400 Received: from [199.232.76.173] (port=52606 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MuSSA-0004H4-Gm for bug-gnu-emacs@gnu.org; Sun, 04 Oct 2009 10:52:50 -0400 Received: from acsinet11.oracle.com ([141.146.126.233]:53228) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MuSSA-0008V0-1S for bug-gnu-emacs@gnu.org; Sun, 04 Oct 2009 10:52:50 -0400 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by acsinet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n94Eqr4O016209 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 4 Oct 2009 14:52:54 GMT Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by acsinet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n94CafAN031612 for ; Sun, 4 Oct 2009 14:53:29 GMT Received: from abhmt020.oracle.com by acsmt355.oracle.com with ESMTP id 20189591731254667924; Sun, 04 Oct 2009 07:52:04 -0700 Received: from dradamslap1 (/24.5.184.158) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 04 Oct 2009 07:52:04 -0700 From: "Drew Adams" To: Date: Sun, 4 Oct 2009 07:52:15 -0700 Message-ID: <5DDA07B831D643C5940FEFB414D6D6AF@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcpFAkMTPsxlR6kETJKWcuiFo8w+Dg== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: acsmt354.oracle.com [141.146.40.154] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090203.4AC8B6BB.0017:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) emacs -Q I have some code that looks like this: (defun repeat-command (command) "Repeat COMMAND." (let ((repeat-previous-repeated-command command) (repeat-message-function 'ignore) (last-repeatable-command 'repeat)) (repeat nil))) (defun foo (arg) (interactive "P") (repeat-command 'bar)) When I use `foo', I see these warnings in *Messages* (and briefly in the echo area): Warning: defvar ignored because repeat-message-function is let-bound Warning: defvar ignored because repeat-previous-repeated-command is let-bound Is this normal? A good idea? Avoidable? Dunno which defvars are involved; it seems they are defvars in `repeat.el'. Why not mention the defvar's variable in the message, BTW? Note: I found it difficult to try to dig deeper using the debugger. The debugger seems useless as soon as `repeat' is involved - it picks up debugger commands to repeat, instead. In GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600) of 2009-07-29 on SOFT-MJASON Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (4.4)' From unknown Thu Sep 11 06:33:38 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4631: 23.1; Warnings from repeat.el Reply-To: Stefan Monnier , 4631@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sun, 04 Oct 2009 16:55:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4631 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125467497730546 (code B ref -1); Sun, 04 Oct 2009 16:55:06 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 4 Oct 2009 16:49:37 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.8 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n94GnZWq030540 for ; Sun, 4 Oct 2009 09:49:37 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MuUH9-000330-Hy for bug-gnu-emacs@gnu.org; Sun, 04 Oct 2009 12:49:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MuUH4-00030j-LP for bug-gnu-emacs@gnu.org; Sun, 04 Oct 2009 12:49:35 -0400 Received: from [199.232.76.173] (port=48176 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MuUH4-00030N-G6 for bug-gnu-emacs@gnu.org; Sun, 04 Oct 2009 12:49:30 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:60573 helo=ironport2-out.pppoe.ca) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MuUH4-0000DJ-3X for bug-gnu-emacs@gnu.org; Sun, 04 Oct 2009 12:49:30 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgkFAFNvyEpMCrS4/2dsb2JhbACBUs0dhCoEhyg X-IronPort-AV: E=Sophos;i="4.44,503,1249272000"; d="scan'208";a="47075110" Received: from 76-10-180-184.dsl.teksavvy.com (HELO ceviche.home) ([76.10.180.184]) by ironport2-out.pppoe.ca with ESMTP; 04 Oct 2009 12:49:29 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 3446BB4103; Sun, 4 Oct 2009 12:49:29 -0400 (EDT) From: Stefan Monnier To: Drew Adams Cc: 4631@debbugs.gnu.org, Message-ID: References: <5DDA07B831D643C5940FEFB414D6D6AF@us.oracle.com> Date: Sun, 04 Oct 2009 12:49:28 -0400 In-Reply-To: <5DDA07B831D643C5940FEFB414D6D6AF@us.oracle.com> (Drew Adams's message of "Sun, 4 Oct 2009 07:52:15 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. >>>>> "Drew" == Drew Adams writes: > emacs -Q > I have some code that looks like this: > (defun repeat-command (command) > "Repeat COMMAND." > (let ((repeat-previous-repeated-command command) > (repeat-message-function 'ignore) > (last-repeatable-command 'repeat)) > (repeat nil))) > (defun foo (arg) > (interactive "P") > (repeat-command 'bar)) > When I use `foo', I see these warnings in *Messages* (and briefly in > the echo area): > Warning: defvar ignored because repeat-message-function is let-bound > Warning: defvar ignored because repeat-previous-repeated-command is let-bound > Is this normal? Yes: the defvar of those variable (in repeat.el) will be processed when repeat.el is loaded, which in your case, happens when `repeat' is called (it's loaded via autoload), i.e. at that point where you've let-bound them, so when you get out of the let, those variables will be incorrectly set back to unbound (i.e. the defvar will have had no effect). > A good idea? Avoidable? Do (require 'repeat) sometime before the let. > Dunno which defvars are involved; it seems they are defvars in > `repeat.el'. Why not mention the defvar's variable in the > message, BTW? It is mentioned. Stefan From unknown Thu Sep 11 06:33:38 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#4631: 23.1; Warnings from repeat.el Reply-To: "Drew Adams" , 4631@debbugs.gnu.org Resent-From: "Drew Adams" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sun, 04 Oct 2009 19:05:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 4631 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125468278719421 (code B ref -1); Sun, 04 Oct 2009 19:05:07 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 4 Oct 2009 18:59:47 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.9 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n94Ixjdg019418 for ; Sun, 4 Oct 2009 11:59:46 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MuWJ7-00084u-4P for bug-gnu-emacs@gnu.org; Sun, 04 Oct 2009 14:59:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MuWJ2-0007zW-Lj for bug-gnu-emacs@gnu.org; Sun, 04 Oct 2009 14:59:44 -0400 Received: from [199.232.76.173] (port=48605 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MuWJ2-0007zL-FW for bug-gnu-emacs@gnu.org; Sun, 04 Oct 2009 14:59:40 -0400 Received: from acsinet11.oracle.com ([141.146.126.233]:28618) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MuWJ1-0003pj-R5 for bug-gnu-emacs@gnu.org; Sun, 04 Oct 2009 14:59:40 -0400 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by acsinet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n94IxcT9025759 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 4 Oct 2009 18:59:39 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n94IVfjd029085; Sun, 4 Oct 2009 19:00:15 GMT Received: from abhmt010.oracle.com by acsmt357.oracle.com with ESMTP id 20190136401254682765; Sun, 04 Oct 2009 13:59:25 -0500 Received: from dradamslap1 (/24.5.184.158) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 04 Oct 2009 11:59:24 -0700 From: "Drew Adams" To: "'Stefan Monnier'" Cc: <4631@debbugs.gnu.org>, References: <5DDA07B831D643C5940FEFB414D6D6AF@us.oracle.com> Date: Sun, 4 Oct 2009 11:59:35 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcpFEqaVd+IzgslKQLa7ER0mqxPiBAAEgEHg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: acsmt357.oracle.com [141.146.40.157] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090202.4AC8F090.005B:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) > > Is this normal? > > Yes: the defvar of those variable (in repeat.el) will be > processed when > repeat.el is loaded, which in your case, happens when > `repeat' is called > (it's loaded via autoload), i.e. at that point where you've let-bound > them, so when you get out of the let, those variables will be > incorrectly set back to unbound (i.e. the defvar will have > had no effect). > > Do (require 'repeat) sometime before the let. OK, thanks. I closed the bug. From drew.adams@oracle.com Sun Oct 4 11:59:44 2009 Received: (at control) by emacsbugs.donarmstrong.com; 4 Oct 2009 18:59:44 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.5 required=4.0 tests=AWL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from rgminet12.oracle.com (rcsinet12.oracle.com [148.87.113.124]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n94Ixgi2019408 for ; Sun, 4 Oct 2009 11:59:43 -0700 Received: from rgminet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by rgminet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n94IxGmh021045 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 4 Oct 2009 18:59:17 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by rgminet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n94FoJtw021547 for ; Sun, 4 Oct 2009 19:00:03 GMT Received: from abhmt017.oracle.com by acsmt355.oracle.com with ESMTP id 20189716541254682691; Sun, 04 Oct 2009 11:58:11 -0700 Received: from dradamslap1 (/24.5.184.158) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 04 Oct 2009 11:58:11 -0700 From: "Drew Adams" To: Subject: bug #4631 - please close Date: Sun, 4 Oct 2009 11:58:21 -0700 Message-ID: <57FDE2C8BDD84A159717E9737CDFBCC7@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcpFJKS37KuNURVfSQCaR1V1cY6WYw== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: acsmt356.oracle.com [141.146.40.156] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090207.4AC8F096.006E:SCFMA4539814,ss=1,fgs=0 close 4631 thanks