emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/callint.c [lexbind]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/src/callint.c [lexbind]
Date: Thu, 28 Oct 2004 22:30:58 -0400

Index: emacs/src/callint.c
diff -c emacs/src/callint.c:1.115.2.5 emacs/src/callint.c:1.115.2.6
*** emacs/src/callint.c:1.115.2.5       Sat Sep  4 09:19:27 2004
--- emacs/src/callint.c Fri Oct 29 02:05:11 2004
***************
*** 110,115 ****
--- 110,116 ----
  r -- Region: point and mark as 2 numeric args, smallest first.  Does no I/O.
  s -- Any string.  Does not inherit the current input method.
  S -- Any symbol.
+ U -- Mouse up event discarded by a previous k or K argument.
  v -- Variable name: symbol that is user-variable-p.
  x -- Lisp expression read but not evaluated.
  X -- Lisp expression read and evaluated.
***************
*** 268,273 ****
--- 269,275 ----
    Lisp_Object specs;
    Lisp_Object filter_specs;
    Lisp_Object teml;
+   Lisp_Object up_event;
    Lisp_Object enable;
    int speccount = SPECPDL_INDEX ();
  
***************
*** 289,295 ****
    char prompt1[100];
    char *tem1;
    int arg_from_tty = 0;
!   struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
    int key_count;
    int record_then_fail = 0;
  
--- 291,297 ----
    char prompt1[100];
    char *tem1;
    int arg_from_tty = 0;
!   struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
    int key_count;
    int record_then_fail = 0;
  
***************
*** 328,333 ****
--- 330,338 ----
       The feature is not fully implemented.  */
    filter_specs = Qnil;
  
+   /* If k or K discard an up-event, save it here so it can be retrieved with 
U */
+   up_event = Qnil;
+ 
    /* Decode the kind of function.  Either handle it and return,
       or go to `lose' if not interactive, or go to `retry'
       to specify a different function, or set either STRING or SPECS.  */
***************
*** 499,505 ****
        varies[i] = 0;
      }
  
!   GCPRO4 (prefix_arg, function, *args, *visargs);
    gcpro3.nvars = (count + 1);
    gcpro4.nvars = (count + 1);
  
--- 504,510 ----
        varies[i] = 0;
      }
  
!   GCPRO5 (prefix_arg, function, *args, *visargs, up_event);
    gcpro3.nvars = (count + 1);
    gcpro4.nvars = (count + 1);
  
***************
*** 628,634 ****
                /* Ignore first element, which is the base key.  */
                tem2 = Fmemq (intern ("down"), Fcdr (teml));
                if (! NILP (tem2))
!                 Fread_event (Qnil, Qnil);
              }
          }
          break;
--- 633,639 ----
                /* Ignore first element, which is the base key.  */
                tem2 = Fmemq (intern ("down"), Fcdr (teml));
                if (! NILP (tem2))
!                 up_event = Fread_event (Qnil, Qnil);
              }
          }
          break;
***************
*** 656,666 ****
                /* Ignore first element, which is the base key.  */
                tem2 = Fmemq (intern ("down"), Fcdr (teml));
                if (! NILP (tem2))
!                 Fread_event (Qnil, Qnil);
              }
          }
          break;
  
        case 'e':               /* The invoking event.  */
          if (next_event >= key_count)
            error ("%s must be bound to an event with parameters",
--- 661,681 ----
                /* Ignore first element, which is the base key.  */
                tem2 = Fmemq (intern ("down"), Fcdr (teml));
                if (! NILP (tem2))
!                 up_event = Fread_event (Qnil, Qnil);
              }
          }
          break;
  
+       case 'U':               /* Up event from last k or K */
+         if (!NILP (up_event))
+           {
+             args[i] = Fmake_vector (make_number (1), up_event);
+             up_event = Qnil;
+             teml = args[i];
+             visargs[i] = Fkey_description (teml, Qnil);
+           }
+         break;
+ 
        case 'e':               /* The invoking event.  */
          if (next_event >= key_count)
            error ("%s must be bound to an event with parameters",




reply via email to

[Prev in Thread] Current Thread [Next in Thread]