[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Editing keyboard macros

From: Jay Belanger
Subject: Re: Editing keyboard macros
Date: Thu, 30 Sep 2004 16:37:25 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

>> 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?


(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 <return> S" [52 53 return 83]] arg "zh"))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]