From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#4631: 23.1; Warnings from repeat.el Date: Sun, 04 Oct 2009 12:49:28 -0400 Message-ID: References: <5DDA07B831D643C5940FEFB414D6D6AF@us.oracle.com> Reply-To: Stefan Monnier , 4631@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1254679708 4678 80.91.229.12 (4 Oct 2009 18:08:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 4 Oct 2009 18:08:28 +0000 (UTC) Cc: 4631@emacsbugs.donarmstrong.com, bug-gnu-emacs@gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 04 20:08:20 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MuUYW-000499-1a for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 Oct 2009 19:07:32 +0200 Original-Received: from localhost ([127.0.0.1]:50481 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MuUYW-0001id-31 for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 Oct 2009 13:07:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MuUYG-0001Xw-6V for bug-gnu-emacs@gnu.org; Sun, 04 Oct 2009 13:07:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MuUYB-0001Vc-RY for bug-gnu-emacs@gnu.org; Sun, 04 Oct 2009 13:07:15 -0400 Original-Received: from [199.232.76.173] (port=33636 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MuUYB-0001VR-H8 for bug-gnu-emacs@gnu.org; Sun, 04 Oct 2009 13:07:11 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:52881) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MuUYA-00030M-MQ for bug-gnu-emacs@gnu.org; Sun, 04 Oct 2009 13:07:11 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n94H78Fl001839; Sun, 4 Oct 2009 10:07:08 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n94GtAL2031617; Sun, 4 Oct 2009 09:55:10 -0700 Resent-Date: Sun, 4 Oct 2009 09:55:10 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sun, 04 Oct 2009 16:55:10 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4631 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4631-submit@emacsbugs.donarmstrong.com id=B4631.125467497730543 (code B ref 4631); Sun, 04 Oct 2009 16:55:10 +0000 Original-Received: (at 4631) by emacsbugs.donarmstrong.com; 4 Oct 2009 16:49:37 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from ironport2-out.pppoe.ca (ironport2-out.teksavvy.com [206.248.154.181]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n94GnZOa030536 for <4631@emacsbugs.donarmstrong.com>; Sun, 4 Oct 2009 09:49:37 -0700 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" Original-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 Original-Received: by ceviche.home (Postfix, from userid 20848) id 3446BB4103; Sun, 4 Oct 2009 12:49:29 -0400 (EDT) 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) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Sun, 04 Oct 2009 13:07:15 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:31669 Archived-At: >>>>> "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