ray@GIBBS.PHYSICS.PURDUE.EDU (Ray Moody) (07/11/89)
When a repeat count is applied to end-kbd-macro, the macro is supposed to be repeated N-1 times. This works, but the repeat count is stored as part of the macro definition, and will be applied to the next command invoked after the macro. Here is a kludge to fix it. (It is fixed by resetting the repeat count after invoking the macro. It should be fixed by not storing the repeat count as part of the macro definition -- but this is somewhat more difficult to do.) Ray ------------------------------------------------------------------------------- RCS file: /usr/src/new/gnu/emacs/src/RCS/macros.c,v retrieving revision 18.54 retrieving revision 18.54.1.1 diff -c -r18.54 -r18.54.1.1 *** /tmp/,RCSt1015968 Mon Jul 10 22:34:20 1989 --- /tmp/,RCSt2015968 Mon Jul 10 22:34:21 1989 *************** *** 26,31 #include "buffer.h" #include "window.h" int defining_kbd_macro; char *kbd_macro_buffer; --- 26,33 ----- #include "buffer.h" #include "window.h" + Lisp_Object Vprefix_arg; + int defining_kbd_macro; char *kbd_macro_buffer; *************** *** 202,207 UNGCPRO; unbind_to (count); return Qnil; } --- 204,210 ----- UNGCPRO; unbind_to (count); + Vprefix_arg = Qnil; return Qnil; }
bbc@titan.rice.edu (Benjamin Chase) (07/12/89)
I think the notion of supplying the repeat count to end-kbd-macro was wrong in the first place. Although it requires more forethought, it seems sensible to me to supply the repeat count before starting the macro definition. -- Ben Chase, Computer Science, Rice University, Houston, Texas
ray@GIBBS.PHYSICS.PURDUE.EDU (Ray Moody) (07/13/89)
In article <BBC.89Jul11145320@titan.rice.edu>, bbc@titan (Benjamin Chase) writes: >I think the notion of supplying the repeat count to end-kbd-macro was >wrong in the first place. Although it requires more forethought, it >seems sensible to me to supply the repeat count before starting the >macro definition. But supplying a repeat count to start-kbd-macro means to append to the last macro definition instead of defining a new keyboard macro. Ray
rbj@DSYS.NCSL.NIST.GOV (Root Boy Jim) (07/13/89)
? From: kalliope!bbc@rice.edu (Benjamin Chase) ? I think the notion of supplying the repeat count to end-kbd-macro was ? wrong in the first place. Although it requires more forethought, it ? seems sensible to me to supply the repeat count before starting the ? macro definition. Or after it via C-x e. This is one case where I believe repeat counts are a mis-feature. However, I do believe that the command set could be collapsed by creative use of ^U as a prefix. For example, consider C-w and M-w. Since an argument is meaningless to C-w, C-U C-w could invoke M-w, leaving that key free for something else. A prefix to M-z could simply move to the next character typed instead of deleting it. If there is any interest in this, I will volunteer to scan the command list for possible candidates. ? Ben Chase, Computer Science, Rice University, Houston, Texas Root Boy Jim Have GNU, Will Travel.
bbc@titan.rice.edu (Benjamin Chase) (07/14/89)
In the following, Rbj is rbj@DSYS.NCSL.NIST.GOV (Root Boy Jim) Ray is ray@GIBBS.PHYSICS.PURDUE.EDU (Ray Moody) Me: I think the notion of supplying the repeat count to end-kbd-macro was wrong in the first place. Although it requires more forethought, it seems sensible to me to supply the repeat count [to start-kbd-macro] before starting the macro definition. Rbj: Or after it via C-x e. This is one case where I believe repeat counts are a mis-feature. [Side discussion about unused coke-bottle bindings, etc.] Me: Yes, via a repeat count to call-last-kbd-macro. One thing at a time, and could you please refer to the function names, rather than their bindings in the future? Ray: But supplying a repeat count to start-kbd-macro means to append to the last macro definition instead of defining a new keyboard macro. Me: Well, hey, let's change the world then. I'd say that having the repeat count mean "repeat" is more obvious than having it mean "append to the previous macro". Perhaps we need a function called append-kbd-macro to handle that job? -- Ben Chase, Computer Science, Rice University, Houston, Texas