/[emacs]/emacs/src/keyboard.c
ViewVC logotype

Diff of /emacs/src/keyboard.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.669 by pj, Wed Apr 3 08:36:56 2002 UTC revision 1.670 by monnier, Fri Apr 12 05:50:15 2002 UTC
# Line 1718  command_loop_1 () Line 1718  command_loop_1 ()
1718          {          {
1719            if (!NILP (Vdeactivate_mark) && !NILP (Vtransient_mark_mode))            if (!NILP (Vdeactivate_mark) && !NILP (Vtransient_mark_mode))
1720              {              {
1721                current_buffer->mark_active = Qnil;                /* We could also call `deactivate'mark'.  */
1722                call1 (Vrun_hooks, intern ("deactivate-mark-hook"));                if (EQ (Vtransient_mark_mode, Qlambda))
1723                    Vtransient_mark_mode = Qnil;
1724                  else
1725                    {
1726                      current_buffer->mark_active = Qnil;
1727                      call1 (Vrun_hooks, intern ("deactivate-mark-hook"));
1728                    }
1729              }              }
1730            else if (current_buffer != prev_buffer || MODIFF != prev_modiff)            else if (current_buffer != prev_buffer || MODIFF != prev_modiff)
1731              call1 (Vrun_hooks, intern ("activate-mark-hook"));              call1 (Vrun_hooks, intern ("activate-mark-hook"));
# Line 3444  gen_help_event (bufp, size, help, frame, Line 3450  gen_help_event (bufp, size, help, frame,
3450       Lisp_Object help, frame, object, window;       Lisp_Object help, frame, object, window;
3451       int pos;       int pos;
3452  {  {
3453    int nevents_stored = 0;    if (size >= 1)
     
   if (size >= 2)  
3454      {      {
3455        bufp->kind = HELP_EVENT;        bufp->kind = HELP_EVENT;
3456        bufp->frame_or_window = frame;        bufp->frame_or_window = frame;
3457        bufp->arg = object;        bufp->arg = object;
3458        bufp->x = make_number (pos);        bufp->x = WINDOWP (window) ? window : frame;
3459        bufp->code = 0;        bufp->y = help;
3460          bufp->code = make_number (pos);
3461        ++bufp;        return 1;
       bufp->kind = HELP_EVENT;  
       bufp->frame_or_window = WINDOWP (window) ? window : frame;  
       bufp->arg = help;  
       bufp->code = 1;  
       nevents_stored = 2;  
3462      }      }
3463      return 0;
   return nevents_stored;  
3464  }  }
3465    
3466    
# Line 3477  kbd_buffer_store_help_event (frame, help Line 3475  kbd_buffer_store_help_event (frame, help
3475    event.kind = HELP_EVENT;    event.kind = HELP_EVENT;
3476    event.frame_or_window = frame;    event.frame_or_window = frame;
3477    event.arg = Qnil;    event.arg = Qnil;
3478    event.x = make_number (0);    event.x = Qnil;
3479      event.y = help;
3480    event.code = 0;    event.code = 0;
3481    kbd_buffer_store_event (&event);    kbd_buffer_store_event (&event);
     
   event.kind = HELP_EVENT;  
   event.frame_or_window = frame;  
   event.arg = help;  
   event.x = make_number (0);  
   event.code = 1;  
   kbd_buffer_store_event (&event);  
3482  }  }
3483    
3484    
# Line 3758  kbd_buffer_get_event (kbp, used_mouse_me Line 3750  kbd_buffer_get_event (kbp, used_mouse_me
3750          kbd_fetch_ptr = event + 1;          kbd_fetch_ptr = event + 1;
3751        else if (event->kind == HELP_EVENT)        else if (event->kind == HELP_EVENT)
3752          {          {
           /* There are always two HELP_EVENTs in the input queue.  */  
3753            Lisp_Object object, position, help, frame, window;            Lisp_Object object, position, help, frame, window;
3754    
           xassert (event->code == 0);  
3755            frame = event->frame_or_window;            frame = event->frame_or_window;
3756            object = event->arg;            object = event->arg;
3757            position = event->x;            position = make_number (event->code);
3758              window = event->x;
3759              help = event->y;
3760            clear_event (event);            clear_event (event);
3761    
3762            kbd_fetch_ptr = event + 1;            kbd_fetch_ptr = event + 1;
           event = ((kbd_fetch_ptr < kbd_buffer + KBD_BUFFER_SIZE)  
                    ? kbd_fetch_ptr  
                    : kbd_buffer);  
           xassert (event->code == 1);  
           help = event->arg;  
           window = event->frame_or_window;  
3763            if (!WINDOWP (window))            if (!WINDOWP (window))
3764              window = Qnil;              window = Qnil;
3765            obj = Fcons (Qhelp_echo,            obj = Fcons (Qhelp_echo,
3766                         list5 (frame, help, window, object, position));                         list5 (frame, help, window, object, position));
           clear_event (event);  
           kbd_fetch_ptr = event + 1;  
3767          }          }
3768        else if (event->kind == FOCUS_IN_EVENT)        else if (event->kind == FOCUS_IN_EVENT)
3769          {          {
# Line 7129  tool_bar_items (reuse, nitems) Line 7113  tool_bar_items (reuse, nitems)
7113    int nmaps, i;    int nmaps, i;
7114    Lisp_Object oquit;    Lisp_Object oquit;
7115    Lisp_Object *tmaps;    Lisp_Object *tmaps;
   extern Lisp_Object Voverriding_local_map_menu_flag;  
   extern Lisp_Object Voverriding_local_map;  
7116    
7117    *nitems = 0;    *nitems = 0;
7118    
# Line 9355  DEFUN ("execute-extended-command", Fexec Line 9337  DEFUN ("execute-extended-command", Fexec
9337  {  {
9338    Lisp_Object function;    Lisp_Object function;
9339    char buf[40];    char buf[40];
9340    Lisp_Object saved_keys;    int saved_last_point_position;
9341      Lisp_Object saved_keys, saved_last_point_position_buffer;
9342    Lisp_Object bindings, value;    Lisp_Object bindings, value;
9343    struct gcpro gcpro1, gcpro2;    struct gcpro gcpro1, gcpro2, gcpro3;
9344    
9345    saved_keys = Fvector (this_command_key_count,    saved_keys = Fvector (this_command_key_count,
9346                          XVECTOR (this_command_keys)->contents);                          XVECTOR (this_command_keys)->contents);
9347      saved_last_point_position_buffer = last_point_position_buffer;
9348      saved_last_point_position = last_point_position;
9349    buf[0] = 0;    buf[0] = 0;
9350    GCPRO2 (saved_keys, prefixarg);    GCPRO3 (saved_keys, prefixarg, saved_last_point_position_buffer);
9351    
9352    if (EQ (prefixarg, Qminus))    if (EQ (prefixarg, Qminus))
9353      strcpy (buf, "- ");      strcpy (buf, "- ");
# Line 9425  DEFUN ("execute-extended-command", Fexec Line 9410  DEFUN ("execute-extended-command", Fexec
9410      add_command_key (make_number ('\015'));      add_command_key (make_number ('\015'));
9411    }    }
9412    
9413      last_point_position = saved_last_point_position;
9414      last_point_position_buffer = saved_last_point_position_buffer;
9415    
9416    UNGCPRO;    UNGCPRO;
9417    
9418    function = Fintern (function, Qnil);    function = Fintern (function, Qnil);

Legend:
Removed from v.1.669  
changed lines
  Added in v.1.670

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26