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: Mon, 01 Nov 2004 00:23:18 +0100 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> <200410312101.i9VL15p06356@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 1099265091 1736 80.91.229.6 (31 Oct 2004 23:24:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 31 Oct 2004 23:24:51 +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 Mon Nov 01 00:24:40 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 1COP3v-0001Dk-00 for ; Mon, 01 Nov 2004 00:24:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1COPBu-000566-3x for ged-emacs-devel@m.gmane.org; Sun, 31 Oct 2004 18:32:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1COPBn-000561-Oj for emacs-devel@gnu.org; Sun, 31 Oct 2004 18:32:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1COPBn-00055p-9m for emacs-devel@gnu.org; Sun, 31 Oct 2004 18:32:47 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1COPBn-00055T-7W for emacs-devel@gnu.org; Sun, 31 Oct 2004 18:32:47 -0500 Original-Received: from [195.41.46.235] (helo=pfepa.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1COP2Z-0005Ml-8E for emacs-devel@gnu.org; Sun, 31 Oct 2004 18:23:15 -0500 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepa.post.tele.dk (Postfix) with SMTP id D6E4247FE3E; Mon, 1 Nov 2004 00:23:07 +0100 (CET) Original-To: Luc Teirlinck In-Reply-To: <200410312101.i9VL15p06356@raven.dms.auburn.edu> (Luc Teirlinck's message of "Sun, 31 Oct 2004 15:01:05 -0600 (CST)") 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:29248 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:29248 Luc Teirlinck writes: > The second one is that I would rename kmacro-appending-p to > kmacro-appending-flag. Of course! But it would be better to get rid of the flag completely. Below you find a patch sets defining-kbd-macro to 'append' when appending. > Unlike in the first case, the user can not but notice > what happened and hence can remove the macro with C-x C-k C-d. This > situation remains unchanged after either your or my patch. Maybe this is ok -- it also gives him the chance to edit it with C-x C-k SPC. > If this > situation happens while appending to a keyboard macro, then > kmacro-appending-p will remain t, even though no macro is being defined. > I could give a concrete example if desired. I suppose that defining-kbd-macro is set to nil in those cases, so my patch fixes that part... I think the patch is ready now -- should I install it? *** kmacro.el 19 Oct 2004 12:54:29 +0200 1.23 --- kmacro.el 01 Nov 2004 00:05:58 +0100 *************** *** 222,227 **** --- 222,237 ---- (global-set-key (vector kmacro-call-mouse-event) 'kmacro-end-call-mouse)) + ;;; Called from keyboard-quit + + (defun kmacro-keyboard-quit () + (or (not defining-kbd-macro) + (eq defining-kbd-macro 'append) + (kmacro-ring-empty-p) + (kmacro-pop-ring))) ;;; Keyboard macro counter *************** *** 585,591 **** (and append (if kmacro-execute-before-append (> (car arg) 4) ! (= (car arg) 4))))))) ;;;###autoload --- 595,603 ---- (and append (if kmacro-execute-before-append (> (car arg) 4) ! (= (car arg) 4)))) ! (if (and defining-kbd-macro append) ! (setq defining-kbd-macro 'append))))) *** simple.el 25 Oct 2004 10:45:18 +0200 1.664 --- simple.el 01 Nov 2004 00:18:07 +0100 *************** *** 3916,3921 **** --- 3916,3923 ---- At top-level, as an editor command, this simply beeps." (interactive) (deactivate-mark) + (if (fboundp 'kmacro-keyboard-quit) + (kmacro-keyboard-quit)) (setq defining-kbd-macro nil) (signal 'quit nil)) -- Kim F. Storm http://www.cua.dk