From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Another bug with the macro counter Date: Sun, 31 Oct 2004 00:43:56 +0200 Message-ID: References: <200410210107.i9L176B10842@raven.dms.auburn.edu> <200410300238.i9U2cOD02290@raven.dms.auburn.edu> <200410300327.i9U3RWW02355@raven.dms.auburn.edu> <200410301451.i9UEpNG02900@raven.dms.auburn.edu> <200410302204.i9UM4vl03402@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1099176287 9480 80.91.229.6 (30 Oct 2004 22:44:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 30 Oct 2004 22:44:47 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 31 00:44:38 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CO1xe-00045i-00 for ; Sun, 31 Oct 2004 00:44:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CO25Z-0000NI-Ev for ged-emacs-devel@m.gmane.org; Sat, 30 Oct 2004 18:52:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CO25F-0000IP-UP for emacs-devel@gnu.org; Sat, 30 Oct 2004 18:52:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CO25D-0000HV-T8 for emacs-devel@gnu.org; Sat, 30 Oct 2004 18:52:28 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CO25D-0000HS-R5 for emacs-devel@gnu.org; Sat, 30 Oct 2004 18:52:27 -0400 Original-Received: from [195.41.46.236] (helo=pfepb.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CO1wp-0006lo-Lz for emacs-devel@gnu.org; Sat, 30 Oct 2004 18:43:47 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepb.post.tele.dk (Postfix) with SMTP id 1A75C5EE03D; Sun, 31 Oct 2004 00:43:46 +0200 (CEST) Original-To: Luc Teirlinck In-Reply-To: <200410302204.i9UM4vl03402@raven.dms.auburn.edu> (Luc Teirlinck's message of "Sat, 30 Oct 2004 17:04:57 -0500 (CDT)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:29198 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:29198 I think your patch is imcomplete (so is mine) -- we only want the kmacro cleanup to happen if we are currently defining a macro, your patch does it always Here is the correct function: (or (not defining-kbd-macro) appending-to-kbd-macro ;; Just for safety. kmacro.el should be loaded if we got here. ;; Nothing else sets `appending-to-kbd-macro' to t. (not (featurep 'kmacro)) (with-no-warnings (kmacro-ring-empty-p)) (with-no-warnings (kmacro-pop-ring))) (setq appending-to-kbd-macro nil) (setq defining-kbd-macro nil) In any case, I still think my approach is cleaner and better. Luc Teirlinck writes: > *************** > *** 3916,3921 **** > --- 3922,3933 ---- > At top-level, as an editor command, this simply beeps." > (interactive) > (deactivate-mark) > + (or appending-to-kbd-macro > + ;; Just for safety. kmacro.el should be loaded if we got here. > + ;; Nothing else sets `appending-to-kbd-macro' to t. > + (not (featurep 'kmacro)) > + (with-no-warnings (kmacro-ring-empty-p)) > + (with-no-warnings (kmacro-pop-ring))) > (setq defining-kbd-macro nil) > (signal 'quit nil)) > > ============================================================ -- Kim F. Storm http://www.cua.dk