mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-04 08:47:11 +00:00
Rename perdisplay to kboard.
This commit is contained in:
parent
92b618385e
commit
cd8b5aa348
@ -55,25 +55,25 @@ clear_prefix_arg ()
|
||||
Vprefix_arg = Qnil;
|
||||
if (!current_prefix_partial)
|
||||
{
|
||||
current_perdisplay->prefix_factor = Qnil;
|
||||
current_perdisplay->prefix_value = Qnil;
|
||||
current_perdisplay->prefix_sign = 1;
|
||||
current_perdisplay->prefix_partial = 0;
|
||||
current_kboard->prefix_factor = Qnil;
|
||||
current_kboard->prefix_value = Qnil;
|
||||
current_kboard->prefix_sign = 1;
|
||||
current_kboard->prefix_partial = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
finalize_prefix_arg ()
|
||||
{
|
||||
if (!NILP (current_perdisplay->prefix_factor))
|
||||
Vprefix_arg = Fcons (current_perdisplay->prefix_factor, Qnil);
|
||||
else if (NILP (current_perdisplay->prefix_value))
|
||||
Vprefix_arg = (current_perdisplay->prefix_sign > 0 ? Qnil : Qminus);
|
||||
else if (current_perdisplay->prefix_sign > 0)
|
||||
Vprefix_arg = current_perdisplay->prefix_value;
|
||||
if (!NILP (current_kboard->prefix_factor))
|
||||
Vprefix_arg = Fcons (current_kboard->prefix_factor, Qnil);
|
||||
else if (NILP (current_kboard->prefix_value))
|
||||
Vprefix_arg = (current_kboard->prefix_sign > 0 ? Qnil : Qminus);
|
||||
else if (current_kboard->prefix_sign > 0)
|
||||
Vprefix_arg = current_kboard->prefix_value;
|
||||
else
|
||||
XSETINT (Vprefix_arg, -XINT (current_perdisplay->prefix_value));
|
||||
current_perdisplay->prefix_partial = 0;
|
||||
XSETINT (Vprefix_arg, -XINT (current_kboard->prefix_value));
|
||||
current_kboard->prefix_partial = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -296,8 +296,8 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
|
||||
}
|
||||
else if (EQ (funcar, Qmocklisp))
|
||||
{
|
||||
#ifdef MULTI_PERDISPLAY
|
||||
display_locked = 1;
|
||||
#ifdef MULTI_KBOARD
|
||||
kboard_locked = 1;
|
||||
#endif
|
||||
return ml_apply (fun, Qinteractive);
|
||||
}
|
||||
@ -352,8 +352,8 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
|
||||
Vcommand_history
|
||||
= Fcons (Fcons (function, values), Vcommand_history);
|
||||
}
|
||||
#ifdef MULTI_PERDISPLAY
|
||||
display_locked = 1;
|
||||
#ifdef MULTI_KBOARD
|
||||
kboard_locked = 1;
|
||||
#endif
|
||||
return apply1 (function, specs);
|
||||
}
|
||||
@ -655,8 +655,8 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
|
||||
if (varies[i] >= 1 && varies[i] <= 4)
|
||||
XSETINT (args[i], marker_position (args[i]));
|
||||
|
||||
#ifdef MULTI_PERDISPLAY
|
||||
display_locked = 1;
|
||||
#ifdef MULTI_KBOARD
|
||||
kboard_locked = 1;
|
||||
#endif
|
||||
|
||||
{
|
||||
@ -705,17 +705,17 @@ Repeating \\[universal-argument] without digits or minus sign\n\
|
||||
if (!current_prefix_partial)
|
||||
{
|
||||
/* First C-u */
|
||||
XSETFASTINT (current_perdisplay->prefix_factor, 4);
|
||||
current_perdisplay->prefix_value = Qnil;
|
||||
current_perdisplay->prefix_sign = 1;
|
||||
current_perdisplay->prefix_partial = 1;
|
||||
XSETFASTINT (current_kboard->prefix_factor, 4);
|
||||
current_kboard->prefix_value = Qnil;
|
||||
current_kboard->prefix_sign = 1;
|
||||
current_kboard->prefix_partial = 1;
|
||||
}
|
||||
else if (!NILP (current_perdisplay->prefix_factor))
|
||||
else if (!NILP (current_kboard->prefix_factor))
|
||||
{
|
||||
/* Subsequent C-u */
|
||||
XSETINT (current_perdisplay->prefix_factor,
|
||||
XINT (current_perdisplay->prefix_factor) * 4);
|
||||
current_perdisplay->prefix_partial = 1;
|
||||
XSETINT (current_kboard->prefix_factor,
|
||||
XINT (current_kboard->prefix_factor) * 4);
|
||||
current_kboard->prefix_partial = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -730,9 +730,9 @@ DEFUN ("negative-argument", Fnegative_argument, Snegative_argument, 0, 0, "",
|
||||
\\[universal-argument] following digits or minus sign ends the argument.")
|
||||
()
|
||||
{
|
||||
current_perdisplay->prefix_factor = Qnil;
|
||||
current_perdisplay->prefix_sign *= -1;
|
||||
current_perdisplay->prefix_partial = 1;
|
||||
current_kboard->prefix_factor = Qnil;
|
||||
current_kboard->prefix_sign *= -1;
|
||||
current_kboard->prefix_partial = 1;
|
||||
}
|
||||
|
||||
DEFUN ("digit-argument", Fdigit_argument, Sdigit_argument, 0, 0, "",
|
||||
@ -744,12 +744,12 @@ DEFUN ("digit-argument", Fdigit_argument, Sdigit_argument, 0, 0, "",
|
||||
if (!(INTEGERP (last_command_char)
|
||||
&& (c = (XINT (last_command_char) & 0177)) >= '0' && c <= '9'))
|
||||
error("digit-argument must be bound to a digit key");
|
||||
current_perdisplay->prefix_factor = Qnil;
|
||||
if (NILP (current_perdisplay->prefix_value))
|
||||
XSETFASTINT (current_perdisplay->prefix_value, 0);
|
||||
XSETINT (current_perdisplay->prefix_value,
|
||||
XINT (current_perdisplay->prefix_value) * 10 + (c - '0'));
|
||||
current_perdisplay->prefix_partial = 1;
|
||||
current_kboard->prefix_factor = Qnil;
|
||||
if (NILP (current_kboard->prefix_value))
|
||||
XSETFASTINT (current_kboard->prefix_value, 0);
|
||||
XSETINT (current_kboard->prefix_value,
|
||||
XINT (current_kboard->prefix_value) * 10 + (c - '0'));
|
||||
current_kboard->prefix_partial = 1;
|
||||
}
|
||||
|
||||
syms_of_callint ()
|
||||
|
76
src/macros.c
76
src/macros.c
@ -42,30 +42,30 @@ Non-nil arg (prefix arg) means append to last macro defined;\n\
|
||||
(append)
|
||||
Lisp_Object append;
|
||||
{
|
||||
if (!NILP (current_perdisplay->defining_kbd_macro))
|
||||
if (!NILP (current_kboard->defining_kbd_macro))
|
||||
error ("Already defining kbd macro");
|
||||
|
||||
if (!current_perdisplay->kbd_macro_buffer)
|
||||
if (!current_kboard->kbd_macro_buffer)
|
||||
{
|
||||
current_perdisplay->kbd_macro_bufsize = 30;
|
||||
current_perdisplay->kbd_macro_buffer
|
||||
current_kboard->kbd_macro_bufsize = 30;
|
||||
current_kboard->kbd_macro_buffer
|
||||
= (Lisp_Object *)malloc (30 * sizeof (Lisp_Object));
|
||||
}
|
||||
update_mode_lines++;
|
||||
if (NILP (append))
|
||||
{
|
||||
current_perdisplay->kbd_macro_ptr = current_perdisplay->kbd_macro_buffer;
|
||||
current_perdisplay->kbd_macro_end = current_perdisplay->kbd_macro_buffer;
|
||||
current_kboard->kbd_macro_ptr = current_kboard->kbd_macro_buffer;
|
||||
current_kboard->kbd_macro_end = current_kboard->kbd_macro_buffer;
|
||||
message("Defining kbd macro...");
|
||||
}
|
||||
else
|
||||
{
|
||||
message("Appending to kbd macro...");
|
||||
current_perdisplay->kbd_macro_ptr = current_perdisplay->kbd_macro_end;
|
||||
Fexecute_kbd_macro (current_perdisplay->Vlast_kbd_macro,
|
||||
current_kboard->kbd_macro_ptr = current_kboard->kbd_macro_end;
|
||||
Fexecute_kbd_macro (current_kboard->Vlast_kbd_macro,
|
||||
make_number (1));
|
||||
}
|
||||
current_perdisplay->defining_kbd_macro = Qt;
|
||||
current_kboard->defining_kbd_macro = Qt;
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
@ -83,32 +83,32 @@ An argument of zero means repeat until error.")
|
||||
(arg)
|
||||
Lisp_Object arg;
|
||||
{
|
||||
if (NILP (current_perdisplay->defining_kbd_macro))
|
||||
error ("Not defining kbd macro.");
|
||||
if (NILP (current_kboard->defining_kbd_macro))
|
||||
error ("Not defining kbd macro.");
|
||||
|
||||
if (NILP (arg))
|
||||
XSETFASTINT (arg, 1);
|
||||
else
|
||||
CHECK_NUMBER (arg, 0);
|
||||
|
||||
if (!NILP (current_perdisplay->defining_kbd_macro))
|
||||
if (!NILP (current_kboard->defining_kbd_macro))
|
||||
{
|
||||
current_perdisplay->defining_kbd_macro = Qnil;
|
||||
current_kboard->defining_kbd_macro = Qnil;
|
||||
update_mode_lines++;
|
||||
current_perdisplay->Vlast_kbd_macro
|
||||
= make_event_array ((current_perdisplay->kbd_macro_end
|
||||
- current_perdisplay->kbd_macro_buffer),
|
||||
current_perdisplay->kbd_macro_buffer);
|
||||
current_kboard->Vlast_kbd_macro
|
||||
= make_event_array ((current_kboard->kbd_macro_end
|
||||
- current_kboard->kbd_macro_buffer),
|
||||
current_kboard->kbd_macro_buffer);
|
||||
message("Keyboard macro defined");
|
||||
}
|
||||
|
||||
if (XFASTINT (arg) == 0)
|
||||
Fexecute_kbd_macro (current_perdisplay->Vlast_kbd_macro, arg);
|
||||
Fexecute_kbd_macro (current_kboard->Vlast_kbd_macro, arg);
|
||||
else
|
||||
{
|
||||
XSETINT (arg, XINT (arg)-1);
|
||||
if (XINT (arg) > 0)
|
||||
Fexecute_kbd_macro (current_perdisplay->Vlast_kbd_macro, arg);
|
||||
Fexecute_kbd_macro (current_kboard->Vlast_kbd_macro, arg);
|
||||
}
|
||||
return Qnil;
|
||||
}
|
||||
@ -118,24 +118,24 @@ An argument of zero means repeat until error.")
|
||||
store_kbd_macro_char (c)
|
||||
Lisp_Object c;
|
||||
{
|
||||
if (!NILP (current_perdisplay->defining_kbd_macro))
|
||||
if (!NILP (current_kboard->defining_kbd_macro))
|
||||
{
|
||||
if ((current_perdisplay->kbd_macro_ptr
|
||||
- current_perdisplay->kbd_macro_buffer)
|
||||
== current_perdisplay->kbd_macro_bufsize)
|
||||
if ((current_kboard->kbd_macro_ptr
|
||||
- current_kboard->kbd_macro_buffer)
|
||||
== current_kboard->kbd_macro_bufsize)
|
||||
{
|
||||
register Lisp_Object *new;
|
||||
current_perdisplay->kbd_macro_bufsize *= 2;
|
||||
new = (Lisp_Object *)xrealloc (current_perdisplay->kbd_macro_buffer,
|
||||
(current_perdisplay->kbd_macro_bufsize
|
||||
current_kboard->kbd_macro_bufsize *= 2;
|
||||
new = (Lisp_Object *)xrealloc (current_kboard->kbd_macro_buffer,
|
||||
(current_kboard->kbd_macro_bufsize
|
||||
* sizeof (Lisp_Object)));
|
||||
current_perdisplay->kbd_macro_ptr
|
||||
+= new - current_perdisplay->kbd_macro_buffer;
|
||||
current_perdisplay->kbd_macro_end
|
||||
+= new - current_perdisplay->kbd_macro_buffer;
|
||||
current_perdisplay->kbd_macro_buffer = new;
|
||||
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;
|
||||
}
|
||||
*current_perdisplay->kbd_macro_ptr++ = c;
|
||||
*current_kboard->kbd_macro_ptr++ = c;
|
||||
}
|
||||
}
|
||||
|
||||
@ -144,7 +144,7 @@ store_kbd_macro_char (c)
|
||||
|
||||
finalize_kbd_macro_chars ()
|
||||
{
|
||||
current_perdisplay->kbd_macro_end = current_perdisplay->kbd_macro_ptr;
|
||||
current_kboard->kbd_macro_end = current_kboard->kbd_macro_ptr;
|
||||
}
|
||||
|
||||
DEFUN ("call-last-kbd-macro", Fcall_last_kbd_macro, Scall_last_kbd_macro,
|
||||
@ -158,12 +158,12 @@ defining others, use \\[name-last-kbd-macro].")
|
||||
(prefix)
|
||||
Lisp_Object prefix;
|
||||
{
|
||||
if (! NILP (current_perdisplay->defining_kbd_macro))
|
||||
if (! NILP (current_kboard->defining_kbd_macro))
|
||||
error ("Can't execute anonymous macro while defining one");
|
||||
else if (NILP (current_perdisplay->Vlast_kbd_macro))
|
||||
else if (NILP (current_kboard->Vlast_kbd_macro))
|
||||
error ("No kbd macro has been defined");
|
||||
else
|
||||
Fexecute_kbd_macro (current_perdisplay->Vlast_kbd_macro, prefix);
|
||||
Fexecute_kbd_macro (current_kboard->Vlast_kbd_macro, prefix);
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
@ -238,7 +238,7 @@ syms_of_macros ()
|
||||
defsubr (&Scall_last_kbd_macro);
|
||||
defsubr (&Sexecute_kbd_macro);
|
||||
|
||||
DEFVAR_DISPLAY ("defining-kbd-macro", defining_kbd_macro,
|
||||
DEFVAR_KBOARD ("defining-kbd-macro", defining_kbd_macro,
|
||||
"Non-nil while a keyboard macro is being defined. Don't set this!");
|
||||
|
||||
DEFVAR_LISP ("executing-macro", &Vexecuting_macro,
|
||||
@ -247,7 +247,7 @@ syms_of_macros ()
|
||||
DEFVAR_LISP_NOPRO ("executing-kbd-macro", &Vexecuting_macro,
|
||||
"Currently executing keyboard macro (string or vector); nil if none executing.");
|
||||
|
||||
DEFVAR_DISPLAY ("last-kbd-macro", Vlast_kbd_macro,
|
||||
DEFVAR_KBOARD ("last-kbd-macro", Vlast_kbd_macro,
|
||||
"Last kbd macro defined, as a string or vector; nil if none defined.");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user