From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: Another bug with the macro counter Date: Sat, 30 Oct 2004 09:51:23 -0500 (CDT) Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <200410301451.i9UEpNG02900@raven.dms.auburn.edu> References: <200410210107.i9L176B10842@raven.dms.auburn.edu> <200410300238.i9U2cOD02290@raven.dms.auburn.edu> <200410300327.i9U3RWW02355@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1099147950 20923 80.91.229.6 (30 Oct 2004 14:52:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 30 Oct 2004 14:52:30 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 30 16:52:17 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 1CNuaX-0007FJ-00 for ; Sat, 30 Oct 2004 16:52:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CNuiR-00056C-2u for ged-emacs-devel@m.gmane.org; Sat, 30 Oct 2004 11:00:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CNuiL-000567-0u for emacs-devel@gnu.org; Sat, 30 Oct 2004 11:00:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CNuiK-00055v-Jd for emacs-devel@gnu.org; Sat, 30 Oct 2004 11:00:20 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CNuiK-00055s-FG for emacs-devel@gnu.org; Sat, 30 Oct 2004 11:00:20 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CNuZo-0002tr-Ub for emacs-devel@gnu.org; Sat, 30 Oct 2004 10:51:33 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id i9UEpWFu028672; Sat, 30 Oct 2004 09:51:32 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id i9UEpNG02900; Sat, 30 Oct 2004 09:51:23 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: monnier@iro.umontreal.ca In-reply-to: (message from Stefan on Sat, 30 Oct 2004 00:06:11 -0400) 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: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:29174 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:29174 Actually, I believe I can quite as well move the _real_ defvar of `appending-to-kbd-macro' to simple.el: ===File ~/simple-diff-4===================================== *** simple.el 25 Oct 2004 07:40:49 -0500 1.664 --- simple.el 30 Oct 2004 09:28:02 -0500 *************** *** 857,862 **** --- 857,865 ---- :type 'boolean :version "21.1") + ;; Quiet the compiler. + (defvar edebug-active) + (defun eval-expression-print-format (value) "Format VALUE as a result of evaluated expression. Return a formatted string which is displayed in the echo area *************** *** 3907,3912 **** --- 3910,3918 ---- ;Turned off because it makes dbx bomb out. (setq blink-paren-function 'blink-matching-open) + (defvar appending-to-kbd-macro nil + "Non-nil when appending to a keyboard macro definition.") + ;; This executes C-g typed while Emacs is waiting for a command. ;; Quitting out of a program does not go through here; ;; that happens in the QUIT macro at the C code level. *************** *** 3916,3921 **** --- 3922,3933 ---- At top-level, as an editor command, this simply beeps." (interactive) (deactivate-mark) + (or (not (featurep 'kmacro)) + appending-to-kbd-macro + ;; never exits the or. + (setq appending-to-kbd-macro nil) + (with-no-warnings (kmacro-ring-empty-p)) + (with-no-warnings (kmacro-pop-ring))) (setq defining-kbd-macro nil) (signal 'quit nil)) ============================================================ ===File ~/kmacro-diff-4===================================== *** kmacro.el 11 Oct 2004 17:28:10 -0500 1.23 --- kmacro.el 30 Oct 2004 09:28:52 -0500 *************** *** 564,569 **** --- 564,570 ---- (if (or defining-kbd-macro executing-kbd-macro) (message "Already defining keyboard macro.") (let ((append (and arg (listp arg)))) + (setq appending-to-kbd-macro append) (unless append (if last-kbd-macro (let ((len (length kmacro-ring))) ============================================================