changeset 12117:3fa5b6e7ad4b

(current_prefix_partial): Deleted. (Vprefix_arg): Deleted; not part of struct kboard again. (Funiversal_argument, Fnegative_argument, Fdigit_argument) (clear_prefix_arg, finalize_prefix_arg, describe_prefix_arg): Deleted. (syms_of_callint): Use DEFVAR_KBOARD for Vprefix_arg. Remove defsubrs for deleted functions.
author Karl Heuer <kwzh@gnu.org>
date Wed, 07 Jun 1995 22:12:07 +0000
parents 1df1abcd466f
children 14520fa2d792
files src/callint.c
diffstat 1 files changed, 2 insertions(+), 105 deletions(-) [+]
line wrap: on
line diff
--- a/src/callint.c	Wed Jun 07 22:07:53 1995 +0000
+++ b/src/callint.c	Wed Jun 07 22:12:07 1995 +0000
@@ -28,8 +28,7 @@
 
 extern char *index ();
 
-int current_prefix_partial;
-Lisp_Object Vprefix_arg, Vcurrent_prefix_arg, Qminus, Qplus;
+Lisp_Object Vcurrent_prefix_arg, Qminus, Qplus;
 Lisp_Object Qcall_interactively;
 Lisp_Object Vcommand_history;
 
@@ -49,45 +48,6 @@
 static Lisp_Object point_marker;
 
 
-void
-clear_prefix_arg ()
-{
-  Vprefix_arg = Qnil;
-  if (!current_prefix_partial)
-    {
-      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_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_kboard->prefix_value));
-  current_kboard->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 comment supplies the doc string for interactive,
    for make-docfile to see.  We cannot put this in the real DEFUN
    due to limits in the Unix cpp.
@@ -694,65 +654,6 @@
   return val;
 }
 
-DEFUN ("universal-argument", Funiversal_argument, Suniversal_argument, 0, 0, "",
-  "Begin a numeric argument for the following command.\n\
-Digits or minus sign following \\[universal-argument] make up the numeric argument.\n\
-\\[universal-argument] following the digits or minus sign ends the argument.\n\
-\\[universal-argument] without digits or minus sign provides 4 as argument.\n\
-Repeating \\[universal-argument] without digits or minus sign\n\
- multiplies the argument by 4 each time.")
-  ()
-{
-  if (!current_prefix_partial)
-    {
-      /* First C-u */
-      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_kboard->prefix_factor))
-    {
-      /* Subsequent C-u */
-      XSETINT (current_kboard->prefix_factor,
-	       XINT (current_kboard->prefix_factor) * 4);
-      current_kboard->prefix_partial = 1;
-    }
-  else
-    {
-      /* Terminating C-u */
-      finalize_prefix_arg ();
-      describe_prefix_arg ();
-    }
-}
-
-DEFUN ("negative-argument", Fnegative_argument, Snegative_argument, 0, 0, "",
-  "Begin a negative numeric argument for the next command.\n\
-\\[universal-argument] following digits or minus sign ends the argument.")
-  ()
-{
-  current_kboard->prefix_factor = Qnil;
-  current_kboard->prefix_sign *= -1;
-  current_kboard->prefix_partial = 1;
-}
-
-DEFUN ("digit-argument", Fdigit_argument, Sdigit_argument, 0, 0, "",
-  "Part of the numeric argument for the next command.\n\
-\\[universal-argument] following digits or minus sign ends the argument.")
-  ()
-{
-  int c;
-  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_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 ()
 {
   point_marker = Fmake_marker ();
@@ -785,7 +686,7 @@
   Qmouse_leave_buffer_hook = intern ("mouse-leave-buffer-hook");
   staticpro (&Qmouse_leave_buffer_hook);
 
-  DEFVAR_LISP ("prefix-arg", &Vprefix_arg,
+  DEFVAR_KBOARD ("prefix-arg", Vprefix_arg,
     "The value of the prefix argument for the next editing command.\n\
 It may be a number, or the symbol `-' for just a minus sign as arg,\n\
 or a list whose car is a number for just one or more C-U's\n\
@@ -795,7 +696,6 @@
 since it has been set to nil by the time you can look.\n\
 Instead, you should use the variable `current-prefix-arg', although\n\
 normally commands can get this prefix argument with (interactive \"P\").");
-  Vprefix_arg = Qnil;
 
   DEFVAR_LISP ("current-prefix-arg", &Vcurrent_prefix_arg,
     "The value of the prefix argument for this editing command.\n\
@@ -833,7 +733,4 @@
   defsubr (&Sinteractive);
   defsubr (&Scall_interactively);
   defsubr (&Sprefix_numeric_value);
-  defsubr (&Suniversal_argument);
-  defsubr (&Snegative_argument);
-  defsubr (&Sdigit_argument);
 }