1991-04-28 02:55:09 +00:00
|
|
|
|
/* Keyboard macros.
|
1993-05-22 21:34:42 +00:00
|
|
|
|
Copyright (C) 1985, 1986, 1993 Free Software Foundation, Inc.
|
1991-04-28 02:55:09 +00:00
|
|
|
|
|
|
|
|
|
This file is part of GNU Emacs.
|
|
|
|
|
|
|
|
|
|
GNU Emacs is free software; you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU General Public License as published by
|
1992-05-18 08:13:37 +00:00
|
|
|
|
the Free Software Foundation; either version 2, or (at your option)
|
1991-04-28 02:55:09 +00:00
|
|
|
|
any later version.
|
|
|
|
|
|
|
|
|
|
GNU Emacs is distributed in the hope that it will be useful,
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with GNU Emacs; see the file COPYING. If not, write to
|
1996-01-15 09:18:04 +00:00
|
|
|
|
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
|
Boston, MA 02111-1307, USA. */
|
1991-04-28 02:55:09 +00:00
|
|
|
|
|
|
|
|
|
|
1993-09-10 06:15:46 +00:00
|
|
|
|
#include <config.h>
|
1991-04-28 02:55:09 +00:00
|
|
|
|
#include "lisp.h"
|
|
|
|
|
#include "macros.h"
|
|
|
|
|
#include "commands.h"
|
|
|
|
|
#include "buffer.h"
|
|
|
|
|
#include "window.h"
|
1995-04-10 05:33:58 +00:00
|
|
|
|
#include "keyboard.h"
|
1991-04-28 02:55:09 +00:00
|
|
|
|
|
|
|
|
|
Lisp_Object Qexecute_kbd_macro;
|
|
|
|
|
|
1996-08-29 04:38:05 +00:00
|
|
|
|
/* Kbd macro currently being executed (a string or vector). */
|
|
|
|
|
|
1991-04-28 02:55:09 +00:00
|
|
|
|
Lisp_Object Vexecuting_macro;
|
1996-08-29 04:38:05 +00:00
|
|
|
|
|
|
|
|
|
/* Index of next character to fetch from that macro. */
|
|
|
|
|
|
1991-04-28 02:55:09 +00:00
|
|
|
|
int executing_macro_index;
|
|
|
|
|
|
1996-08-29 04:38:05 +00:00
|
|
|
|
/* Number of successful iterations so far
|
|
|
|
|
for innermost keyboard macro.
|
|
|
|
|
This is not bound at each level,
|
|
|
|
|
so after an error, it describes the innermost interrupted macro. */
|
|
|
|
|
|
|
|
|
|
int executing_macro_iterations;
|
|
|
|
|
|
|
|
|
|
/* This is the macro that was executing.
|
|
|
|
|
This is not bound at each level,
|
|
|
|
|
so after an error, it describes the innermost interrupted macro.
|
|
|
|
|
We use it only as a kind of flag, so no need to protect it. */
|
|
|
|
|
|
|
|
|
|
Lisp_Object executing_macro;
|
|
|
|
|
|
1998-10-12 20:03:15 +00:00
|
|
|
|
extern Lisp_Object real_this_command;
|
|
|
|
|
|
1991-04-28 02:55:09 +00:00
|
|
|
|
Lisp_Object Fexecute_kbd_macro ();
|
|
|
|
|
|
|
|
|
|
DEFUN ("start-kbd-macro", Fstart_kbd_macro, Sstart_kbd_macro, 1, 1, "P",
|
|
|
|
|
"Record subsequent keyboard input, defining a keyboard macro.\n\
|
|
|
|
|
The commands are recorded even as they are executed.\n\
|
|
|
|
|
Use \\[end-kbd-macro] to finish recording and make the macro available.\n\
|
|
|
|
|
Use \\[name-last-kbd-macro] to give it a permanent name.\n\
|
|
|
|
|
Non-nil arg (prefix arg) means append to last macro defined;\n\
|
|
|
|
|
This begins by re-executing that macro as if you typed it again.")
|
|
|
|
|
(append)
|
|
|
|
|
Lisp_Object append;
|
|
|
|
|
{
|
1995-03-15 01:49:46 +00:00
|
|
|
|
if (!NILP (current_kboard->defining_kbd_macro))
|
1991-04-28 02:55:09 +00:00
|
|
|
|
error ("Already defining kbd macro");
|
|
|
|
|
|
1995-03-15 01:49:46 +00:00
|
|
|
|
if (!current_kboard->kbd_macro_buffer)
|
1995-03-03 05:02:50 +00:00
|
|
|
|
{
|
1995-03-15 01:49:46 +00:00
|
|
|
|
current_kboard->kbd_macro_bufsize = 30;
|
|
|
|
|
current_kboard->kbd_macro_buffer
|
1996-01-24 23:41:04 +00:00
|
|
|
|
= (Lisp_Object *)xmalloc (30 * sizeof (Lisp_Object));
|
1995-03-03 05:02:50 +00:00
|
|
|
|
}
|
1991-04-28 02:55:09 +00:00
|
|
|
|
update_mode_lines++;
|
1992-01-13 21:48:08 +00:00
|
|
|
|
if (NILP (append))
|
1991-04-28 02:55:09 +00:00
|
|
|
|
{
|
1996-01-24 23:41:04 +00:00
|
|
|
|
if (current_kboard->kbd_macro_bufsize > 200)
|
|
|
|
|
{
|
|
|
|
|
current_kboard->kbd_macro_bufsize = 30;
|
|
|
|
|
current_kboard->kbd_macro_buffer
|
1996-05-12 20:07:43 +00:00
|
|
|
|
= (Lisp_Object *)xrealloc (current_kboard->kbd_macro_buffer,
|
|
|
|
|
30 * sizeof (Lisp_Object));
|
1996-01-24 23:41:04 +00:00
|
|
|
|
}
|
1995-03-15 01:49:46 +00:00
|
|
|
|
current_kboard->kbd_macro_ptr = current_kboard->kbd_macro_buffer;
|
|
|
|
|
current_kboard->kbd_macro_end = current_kboard->kbd_macro_buffer;
|
1996-01-24 23:41:04 +00:00
|
|
|
|
message ("Defining kbd macro...");
|
1991-04-28 02:55:09 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
1996-01-24 23:41:04 +00:00
|
|
|
|
message ("Appending to kbd macro...");
|
1995-03-15 01:49:46 +00:00
|
|
|
|
current_kboard->kbd_macro_ptr = current_kboard->kbd_macro_end;
|
|
|
|
|
Fexecute_kbd_macro (current_kboard->Vlast_kbd_macro,
|
1995-03-08 01:25:04 +00:00
|
|
|
|
make_number (1));
|
1991-04-28 02:55:09 +00:00
|
|
|
|
}
|
1995-03-15 01:49:46 +00:00
|
|
|
|
current_kboard->defining_kbd_macro = Qt;
|
1991-04-28 02:55:09 +00:00
|
|
|
|
|
|
|
|
|
return Qnil;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DEFUN ("end-kbd-macro", Fend_kbd_macro, Send_kbd_macro, 0, 1, "p",
|
|
|
|
|
"Finish defining a keyboard macro.\n\
|
|
|
|
|
The definition was started by \\[start-kbd-macro].\n\
|
|
|
|
|
The macro is now available for use via \\[call-last-kbd-macro],\n\
|
|
|
|
|
or it can be given a name with \\[name-last-kbd-macro] and then invoked\n\
|
|
|
|
|
under that name.\n\
|
|
|
|
|
\n\
|
|
|
|
|
With numeric arg, repeat macro now that many times,\n\
|
|
|
|
|
counting the definition just completed as the first repetition.\n\
|
|
|
|
|
An argument of zero means repeat until error.")
|
1996-01-09 00:33:09 +00:00
|
|
|
|
(repeat)
|
|
|
|
|
Lisp_Object repeat;
|
1991-04-28 02:55:09 +00:00
|
|
|
|
{
|
1995-03-15 01:49:46 +00:00
|
|
|
|
if (NILP (current_kboard->defining_kbd_macro))
|
1998-08-06 05:36:45 +00:00
|
|
|
|
error ("Not defining kbd macro");
|
1991-04-28 02:55:09 +00:00
|
|
|
|
|
1996-01-09 00:33:09 +00:00
|
|
|
|
if (NILP (repeat))
|
|
|
|
|
XSETFASTINT (repeat, 1);
|
1991-04-28 02:55:09 +00:00
|
|
|
|
else
|
1996-01-09 00:33:09 +00:00
|
|
|
|
CHECK_NUMBER (repeat, 0);
|
1991-04-28 02:55:09 +00:00
|
|
|
|
|
1995-03-15 01:49:46 +00:00
|
|
|
|
if (!NILP (current_kboard->defining_kbd_macro))
|
1991-04-28 02:55:09 +00:00
|
|
|
|
{
|
1995-03-15 01:49:46 +00:00
|
|
|
|
current_kboard->defining_kbd_macro = Qnil;
|
1991-04-28 02:55:09 +00:00
|
|
|
|
update_mode_lines++;
|
1995-03-15 01:49:46 +00:00
|
|
|
|
current_kboard->Vlast_kbd_macro
|
|
|
|
|
= make_event_array ((current_kboard->kbd_macro_end
|
|
|
|
|
- current_kboard->kbd_macro_buffer),
|
|
|
|
|
current_kboard->kbd_macro_buffer);
|
1996-01-24 23:41:04 +00:00
|
|
|
|
message ("Keyboard macro defined");
|
1991-04-28 02:55:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
1996-01-09 00:33:09 +00:00
|
|
|
|
if (XFASTINT (repeat) == 0)
|
|
|
|
|
Fexecute_kbd_macro (current_kboard->Vlast_kbd_macro, repeat);
|
1991-04-28 02:55:09 +00:00
|
|
|
|
else
|
|
|
|
|
{
|
1996-01-09 00:33:09 +00:00
|
|
|
|
XSETINT (repeat, XINT (repeat)-1);
|
|
|
|
|
if (XINT (repeat) > 0)
|
|
|
|
|
Fexecute_kbd_macro (current_kboard->Vlast_kbd_macro, repeat);
|
1991-04-28 02:55:09 +00:00
|
|
|
|
}
|
|
|
|
|
return Qnil;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Store character c into kbd macro being defined */
|
|
|
|
|
|
1997-11-21 13:03:55 +00:00
|
|
|
|
void
|
1991-04-28 02:55:09 +00:00
|
|
|
|
store_kbd_macro_char (c)
|
|
|
|
|
Lisp_Object c;
|
|
|
|
|
{
|
1995-03-15 01:49:46 +00:00
|
|
|
|
if (!NILP (current_kboard->defining_kbd_macro))
|
1991-04-28 02:55:09 +00:00
|
|
|
|
{
|
1995-03-15 01:49:46 +00:00
|
|
|
|
if ((current_kboard->kbd_macro_ptr
|
|
|
|
|
- current_kboard->kbd_macro_buffer)
|
|
|
|
|
== current_kboard->kbd_macro_bufsize)
|
1991-04-28 02:55:09 +00:00
|
|
|
|
{
|
1995-03-03 05:02:50 +00:00
|
|
|
|
register Lisp_Object *new;
|
1995-03-15 01:49:46 +00:00
|
|
|
|
current_kboard->kbd_macro_bufsize *= 2;
|
|
|
|
|
new = (Lisp_Object *)xrealloc (current_kboard->kbd_macro_buffer,
|
|
|
|
|
(current_kboard->kbd_macro_bufsize
|
1995-03-03 05:02:50 +00:00
|
|
|
|
* sizeof (Lisp_Object)));
|
1995-03-15 01:49:46 +00:00
|
|
|
|
current_kboard->kbd_macro_ptr
|
|
|
|
|
+= new - current_kboard->kbd_macro_buffer;
|
|
|
|
|
current_kboard->kbd_macro_end
|
|
|
|
|
+= new - current_kboard->kbd_macro_buffer;
|
|
|
|
|
current_kboard->kbd_macro_buffer = new;
|
1991-04-28 02:55:09 +00:00
|
|
|
|
}
|
1995-03-15 01:49:46 +00:00
|
|
|
|
*current_kboard->kbd_macro_ptr++ = c;
|
1991-04-28 02:55:09 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Declare that all chars stored so far in the kbd macro being defined
|
|
|
|
|
really belong to it. This is done in between editor commands. */
|
|
|
|
|
|
1997-11-21 13:03:55 +00:00
|
|
|
|
void
|
1991-04-28 02:55:09 +00:00
|
|
|
|
finalize_kbd_macro_chars ()
|
|
|
|
|
{
|
1995-03-15 01:49:46 +00:00
|
|
|
|
current_kboard->kbd_macro_end = current_kboard->kbd_macro_ptr;
|
1991-04-28 02:55:09 +00:00
|
|
|
|
}
|
1995-08-13 15:47:11 +00:00
|
|
|
|
|
|
|
|
|
DEFUN ("cancel-kbd-macro-events", Fcancel_kbd_macro_events,
|
|
|
|
|
Scancel_kbd_macro_events, 0, 0, 0,
|
|
|
|
|
"Cancel the events added to a keyboard macro for this command.")
|
|
|
|
|
()
|
|
|
|
|
{
|
|
|
|
|
current_kboard->kbd_macro_ptr = current_kboard->kbd_macro_end;
|
|
|
|
|
}
|
1995-12-21 17:11:28 +00:00
|
|
|
|
|
|
|
|
|
DEFUN ("store-kbd-macro-event", Fstore_kbd_macro_event,
|
|
|
|
|
Sstore_kbd_macro_event, 1, 1, 0,
|
|
|
|
|
"Store EVENT into the keyboard macro being defined.")
|
|
|
|
|
(event)
|
|
|
|
|
Lisp_Object event;
|
|
|
|
|
{
|
|
|
|
|
store_kbd_macro_char (event);
|
|
|
|
|
return Qnil;
|
|
|
|
|
}
|
1991-04-28 02:55:09 +00:00
|
|
|
|
|
|
|
|
|
DEFUN ("call-last-kbd-macro", Fcall_last_kbd_macro, Scall_last_kbd_macro,
|
|
|
|
|
0, 1, "p",
|
|
|
|
|
"Call the last keyboard macro that you defined with \\[start-kbd-macro].\n\
|
|
|
|
|
\n\
|
|
|
|
|
A prefix argument serves as a repeat count. Zero means repeat until error.\n\
|
|
|
|
|
\n\
|
|
|
|
|
To make a macro permanent so you can call it even after\n\
|
|
|
|
|
defining others, use \\[name-last-kbd-macro].")
|
|
|
|
|
(prefix)
|
|
|
|
|
Lisp_Object prefix;
|
|
|
|
|
{
|
1996-11-11 20:33:21 +00:00
|
|
|
|
/* Don't interfere with recognition of the previous command
|
|
|
|
|
from before this macro started. */
|
1998-08-09 21:55:58 +00:00
|
|
|
|
Vthis_command = current_kboard->Vlast_command;
|
1999-03-30 18:02:13 +00:00
|
|
|
|
/* C-x z after the macro should repeat the macro. */
|
|
|
|
|
real_this_command = current_kboard->Vlast_kbd_macro;
|
1996-11-11 20:33:21 +00:00
|
|
|
|
|
1995-03-15 01:49:46 +00:00
|
|
|
|
if (! NILP (current_kboard->defining_kbd_macro))
|
1991-04-28 02:55:09 +00:00
|
|
|
|
error ("Can't execute anonymous macro while defining one");
|
1995-03-15 01:49:46 +00:00
|
|
|
|
else if (NILP (current_kboard->Vlast_kbd_macro))
|
1991-04-28 02:55:09 +00:00
|
|
|
|
error ("No kbd macro has been defined");
|
|
|
|
|
else
|
1995-03-15 01:49:46 +00:00
|
|
|
|
Fexecute_kbd_macro (current_kboard->Vlast_kbd_macro, prefix);
|
1996-11-11 20:33:21 +00:00
|
|
|
|
|
|
|
|
|
/* command_loop_1 sets this to nil before it returns;
|
|
|
|
|
get back the last command within the macro
|
|
|
|
|
so that it can be last, again, after we return. */
|
1998-08-09 21:55:58 +00:00
|
|
|
|
Vthis_command = current_kboard->Vlast_command;
|
1996-11-11 20:33:21 +00:00
|
|
|
|
|
1991-04-28 02:55:09 +00:00
|
|
|
|
return Qnil;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Restore Vexecuting_macro and executing_macro_index - called when
|
|
|
|
|
the unwind-protect in Fexecute_kbd_macro gets invoked. */
|
1996-08-29 04:38:05 +00:00
|
|
|
|
|
1991-04-28 02:55:09 +00:00
|
|
|
|
static Lisp_Object
|
|
|
|
|
pop_kbd_macro (info)
|
|
|
|
|
Lisp_Object info;
|
|
|
|
|
{
|
|
|
|
|
Lisp_Object tem;
|
1999-03-30 18:02:13 +00:00
|
|
|
|
Vexecuting_macro = XCAR (info);
|
|
|
|
|
tem = XCDR (info);
|
|
|
|
|
executing_macro_index = XINT (XCAR (tem));
|
|
|
|
|
real_this_command = XCDR (tem);
|
1991-04-28 02:55:09 +00:00
|
|
|
|
return Qnil;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DEFUN ("execute-kbd-macro", Fexecute_kbd_macro, Sexecute_kbd_macro, 1, 2, 0,
|
|
|
|
|
"Execute MACRO as string of editor command characters.\n\
|
|
|
|
|
If MACRO is a symbol, its function definition is used.\n\
|
|
|
|
|
COUNT is a repeat count, or nil for once, or 0 for infinite loop.")
|
1996-01-09 00:33:09 +00:00
|
|
|
|
(macro, count)
|
|
|
|
|
Lisp_Object macro, count;
|
1991-04-28 02:55:09 +00:00
|
|
|
|
{
|
|
|
|
|
Lisp_Object final;
|
|
|
|
|
Lisp_Object tem;
|
1996-01-09 02:34:30 +00:00
|
|
|
|
int pdlcount = specpdl_ptr - specpdl;
|
1991-04-28 02:55:09 +00:00
|
|
|
|
int repeat = 1;
|
|
|
|
|
struct gcpro gcpro1;
|
1996-08-29 04:38:05 +00:00
|
|
|
|
int success_count = 0;
|
1991-04-28 02:55:09 +00:00
|
|
|
|
|
1999-03-14 06:33:01 +00:00
|
|
|
|
executing_macro_iterations = 0;
|
|
|
|
|
|
1996-01-09 03:58:16 +00:00
|
|
|
|
if (!NILP (count))
|
|
|
|
|
{
|
|
|
|
|
count = Fprefix_numeric_value (count);
|
|
|
|
|
repeat = XINT (count);
|
|
|
|
|
}
|
1991-04-28 02:55:09 +00:00
|
|
|
|
|
1992-05-18 08:13:37 +00:00
|
|
|
|
final = indirect_function (macro);
|
1994-09-27 02:25:20 +00:00
|
|
|
|
if (!STRINGP (final) && !VECTORP (final))
|
1998-08-06 05:36:45 +00:00
|
|
|
|
error ("Keyboard macros must be strings or vectors");
|
1991-04-28 02:55:09 +00:00
|
|
|
|
|
1999-03-30 18:02:13 +00:00
|
|
|
|
tem = Fcons (Vexecuting_macro,
|
|
|
|
|
Fcons (make_number (executing_macro_index),
|
|
|
|
|
real_this_command));
|
1991-04-28 02:55:09 +00:00
|
|
|
|
record_unwind_protect (pop_kbd_macro, tem);
|
|
|
|
|
|
|
|
|
|
GCPRO1 (final);
|
|
|
|
|
do
|
|
|
|
|
{
|
|
|
|
|
Vexecuting_macro = final;
|
1996-08-29 04:38:05 +00:00
|
|
|
|
executing_macro = final;
|
1991-04-28 02:55:09 +00:00
|
|
|
|
executing_macro_index = 0;
|
|
|
|
|
|
1995-06-07 22:24:23 +00:00
|
|
|
|
current_kboard->Vprefix_arg = Qnil;
|
1991-04-28 02:55:09 +00:00
|
|
|
|
command_loop_1 ();
|
1992-12-12 15:35:41 +00:00
|
|
|
|
|
1996-08-29 04:38:05 +00:00
|
|
|
|
executing_macro_iterations = ++success_count;
|
|
|
|
|
|
1992-12-12 15:35:41 +00:00
|
|
|
|
QUIT;
|
1991-04-28 02:55:09 +00:00
|
|
|
|
}
|
1994-09-27 02:25:20 +00:00
|
|
|
|
while (--repeat
|
|
|
|
|
&& (STRINGP (Vexecuting_macro) || VECTORP (Vexecuting_macro)));
|
1991-04-28 02:55:09 +00:00
|
|
|
|
|
1996-08-29 04:38:05 +00:00
|
|
|
|
executing_macro = Qnil;
|
|
|
|
|
|
1998-10-12 20:03:15 +00:00
|
|
|
|
real_this_command = Vexecuting_macro;
|
|
|
|
|
|
1991-04-28 02:55:09 +00:00
|
|
|
|
UNGCPRO;
|
1996-01-09 02:34:30 +00:00
|
|
|
|
return unbind_to (pdlcount, Qnil);
|
1991-04-28 02:55:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
1997-11-21 13:03:55 +00:00
|
|
|
|
void
|
1991-04-28 02:55:09 +00:00
|
|
|
|
init_macros ()
|
|
|
|
|
{
|
|
|
|
|
Vexecuting_macro = Qnil;
|
1996-08-29 21:22:04 +00:00
|
|
|
|
executing_macro = Qnil;
|
1991-04-28 02:55:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
1997-11-21 13:03:55 +00:00
|
|
|
|
void
|
1991-04-28 02:55:09 +00:00
|
|
|
|
syms_of_macros ()
|
|
|
|
|
{
|
|
|
|
|
Qexecute_kbd_macro = intern ("execute-kbd-macro");
|
|
|
|
|
staticpro (&Qexecute_kbd_macro);
|
|
|
|
|
|
|
|
|
|
defsubr (&Sstart_kbd_macro);
|
|
|
|
|
defsubr (&Send_kbd_macro);
|
|
|
|
|
defsubr (&Scall_last_kbd_macro);
|
|
|
|
|
defsubr (&Sexecute_kbd_macro);
|
1995-08-13 15:47:11 +00:00
|
|
|
|
defsubr (&Scancel_kbd_macro_events);
|
1995-12-21 17:11:28 +00:00
|
|
|
|
defsubr (&Sstore_kbd_macro_event);
|
1991-04-28 02:55:09 +00:00
|
|
|
|
|
1995-03-15 01:49:46 +00:00
|
|
|
|
DEFVAR_KBOARD ("defining-kbd-macro", defining_kbd_macro,
|
1991-04-28 02:55:09 +00:00
|
|
|
|
"Non-nil while a keyboard macro is being defined. Don't set this!");
|
|
|
|
|
|
|
|
|
|
DEFVAR_LISP ("executing-macro", &Vexecuting_macro,
|
1995-03-08 01:25:04 +00:00
|
|
|
|
"Currently executing keyboard macro (string or vector); nil if none executing.");
|
1991-04-28 02:55:09 +00:00
|
|
|
|
|
|
|
|
|
DEFVAR_LISP_NOPRO ("executing-kbd-macro", &Vexecuting_macro,
|
1995-03-08 01:25:04 +00:00
|
|
|
|
"Currently executing keyboard macro (string or vector); nil if none executing.");
|
1991-04-28 02:55:09 +00:00
|
|
|
|
|
1995-03-15 01:49:46 +00:00
|
|
|
|
DEFVAR_KBOARD ("last-kbd-macro", Vlast_kbd_macro,
|
1995-03-08 01:25:04 +00:00
|
|
|
|
"Last kbd macro defined, as a string or vector; nil if none defined.");
|
1991-04-28 02:55:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
1997-11-21 13:03:55 +00:00
|
|
|
|
void
|
1991-04-28 02:55:09 +00:00
|
|
|
|
keys_of_macros ()
|
|
|
|
|
{
|
|
|
|
|
initial_define_key (control_x_map, ('e'), "call-last-kbd-macro");
|
|
|
|
|
initial_define_key (control_x_map, ('('), "start-kbd-macro");
|
|
|
|
|
initial_define_key (control_x_map, (')'), "end-kbd-macro");
|
|
|
|
|
}
|