Mercurial > emacs
changeset 10939:d2971946a3d2
Moved clear_prefix_arg, finalize_prefix_arg, describe_prefix_arg to callint.c.
(command_loop_1): Removed inline code for prefix args.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Wed, 08 Mar 1995 03:31:18 +0000 |
parents | fb2da60a38de |
children | 40a1812dcbad |
files | src/keyboard.c |
diffstat | 1 files changed, 2 insertions(+), 83 deletions(-) [+] |
line wrap: on
line diff
--- a/src/keyboard.c Wed Mar 08 02:22:45 1995 +0000 +++ b/src/keyboard.c Wed Mar 08 03:31:18 1995 +0000 @@ -281,7 +281,7 @@ Lisp_Object Qforward_char; Lisp_Object Qbackward_char; Lisp_Object Qundefined; -Lisp_Object Quniversal_argument, Qdigit_argument, Qnegative_argument; +Lisp_Object Qdigit_argument, Qnegative_argument; /* read_key_sequence stores here the command definition of the key sequence that it reads. */ @@ -972,43 +972,6 @@ error ("No recursive edit is in progress"); } -void -clear_prefix_arg () -{ - if (!current_perdisplay) - abort (); - current_perdisplay->prefix_factor = Qnil; - current_perdisplay->prefix_value = Qnil; - current_perdisplay->prefix_sign = 1; - current_perdisplay->prefix_partial = 0; - Vprefix_arg = Qnil; -} - -static 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; - else - XSETINT (Vprefix_arg, -XINT (current_perdisplay->prefix_value)); - current_perdisplay->prefix_partial = 0; -} - -static void -describe_prefix_arg () -{ - if (INTEGERP (Vprefix_arg)) - message ("Arg: %d", Vprefix_arg); - else if (CONSP (Vprefix_arg)) - message ("Arg: [%d]", XCONS (Vprefix_arg)->car); - else if (EQ (Vprefix_arg, Qminus)) - message ("Arg: -"); -} - /* This is the actual command reading loop, sans error-handling encapsulation. */ @@ -1191,48 +1154,7 @@ } else { - if (EQ (cmd, Quniversal_argument)) - { - if (!current_perdisplay->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; - } - else if (!NILP (current_perdisplay->prefix_factor)) - { - /* Subsequent C-u */ - XSETINT (current_perdisplay->prefix_factor, - XINT (current_perdisplay->prefix_factor) * 4); - } - else - { - /* Terminating C-u */ - finalize_prefix_arg (); - describe_prefix_arg (); - } - goto directly_done; - } - else if (EQ (cmd, Qnegative_argument)) - { - current_perdisplay->prefix_factor = Qnil; - current_perdisplay->prefix_sign *= -1; - current_perdisplay->prefix_partial = 1; - goto directly_done; - } - else if (EQ (cmd, Qdigit_argument) && INTEGERP (keybuf[0])) - { - 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 - + (XINT (keybuf[0]) & 0177) - '0')); - current_perdisplay->prefix_partial = 1; - goto directly_done; - } + current_prefix_partial = current_perdisplay->prefix_partial; if (current_perdisplay->prefix_partial) finalize_prefix_arg (); @@ -6572,9 +6494,6 @@ Qundefined = intern ("undefined"); staticpro (&Qundefined); - Quniversal_argument = intern ("universal-argument"); - staticpro (&Quniversal_argument); - Qdigit_argument = intern ("digit-argument"); staticpro (&Qdigit_argument);