From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jay Belanger Newsgroups: gmane.emacs.devel Subject: Re: Editing keyboard macros Date: Thu, 30 Sep 2004 16:37:25 -0500 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <87llerbfqi.fsf@vh213602.truman.edu> References: <87r7ok521t.fsf@vh213602.truman.edu> <87r7ojbl6h.fsf@vh213602.truman.edu> Reply-To: belanger@truman.edu NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1096580360 27772 80.91.229.6 (30 Sep 2004 21:39:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 30 Sep 2004 21:39:20 +0000 (UTC) Cc: belanger@truman.edu, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 30 23:39:07 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 1CD8dm-0003Np-00 for ; Thu, 30 Sep 2004 23:39:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CD8kB-0006vu-MU for ged-emacs-devel@m.gmane.org; Thu, 30 Sep 2004 17:45:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CD8ih-0006GO-UR for emacs-devel@gnu.org; Thu, 30 Sep 2004 17:44:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CD8ie-0006Ec-QE for emacs-devel@gnu.org; Thu, 30 Sep 2004 17:44:09 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CD8ie-0006EL-MB for emacs-devel@gnu.org; Thu, 30 Sep 2004 17:44:08 -0400 Original-Received: from [150.243.160.94] (helo=uranium.truman.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CD8cE-0002Wa-7r for emacs-devel@gnu.org; Thu, 30 Sep 2004 17:37:30 -0400 Original-Received: from gold.truman.edu ([150.243.160.250]) by uranium.truman.edu (8.12.10/8.12.10) with ESMTP id i8ULbTxu022316; Thu, 30 Sep 2004 16:37:29 -0500 (envelope-from belanger@truman.edu) Original-Received: from vh213602.truman.edu.truman.edu (vh213602.truman.edu [150.243.160.239]) by gold.truman.edu (Postfix) with ESMTP id 75F5C6E4109; Thu, 30 Sep 2004 16:37:25 -0500 (CDT) Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: (Kim F. Storm's message of "Thu, 30 Sep 2004 22:29:54 +0200") 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: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:27759 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:27759 >> It doesn't work on keyboard macros that Calc saves, but that's a >> problem with Calc that needs to be fixed. > > What's special about them ? > Can you show me an example ? Mostly, I think, it uses `calc-execute-kbd-macro' instead of `kmacro-exec-ring-item'. There are other differences, the two macros at the end of this message both enter "45 RET S". Calc keyboard macros are created in the usual way, but Calc saves it's macros differently because using a kmacro saved macro in Calc will put each part of it on the Calc trail and in the undo stack, using a Calc saved keyboard macro will only put one item in the trail and stack. (Calc does other things different, too. When it attaches a macro to a key, it makes it local to Calc.) I'm thinking it might make sense to modify macedit.el, which came with older versions of Calc, to create a special Calc keyboard macro editing function. macedit.el wasn't made part of Emacs when Calc was, but it was written by Dave Gillespie. Can anyone say if the copyright papers he signed would also cover macedit.el? Jay (defun calc-User-g (&optional arg) "Keyboard macro." (interactive "p") (kmacro-exec-ring-item (quote ([52 53 return 83] 0 "%d")) arg)) (defun calc-User-h (arg) (interactive "P") (calc-execute-kbd-macro ["4 5 S" [52 53 return 83]] arg "zh"))