emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Ken Raeburn
Subject: [Emacs-diffs] Changes to emacs/src/keyboard.c
Date: Tue, 16 Jul 2002 13:40:57 -0400

Index: emacs/src/keyboard.c
diff -c emacs/src/keyboard.c:1.696 emacs/src/keyboard.c:1.697
*** emacs/src/keyboard.c:1.696  Tue Jul 16 11:49:29 2002
--- emacs/src/keyboard.c        Tue Jul 16 13:40:57 2002
***************
*** 748,755 ****
        }
        else if (SYMBOLP (c))
        {
!         struct Lisp_String *name = XSTRING (SYMBOL_NAME (c));
!         int nbytes = STRING_BYTES (name);
          
          if (size - (ptr - buffer) < nbytes)
            {
--- 748,755 ----
        }
        else if (SYMBOLP (c))
        {
!         Lisp_Object name = SYMBOL_NAME (c);
!         int nbytes = SBYTES (name);
          
          if (size - (ptr - buffer) < nbytes)
            {
***************
*** 759,766 ****
              ptr = buffer + offset;
            }
  
!         ptr += copy_text (name->data, ptr, nbytes,
!                           name->size_byte >= 0, 1);
        }
  
        if ((NILP (echo_string) || SCHARS (echo_string) == 0)
--- 759,766 ----
              ptr = buffer + offset;
            }
  
!         ptr += copy_text (SDATA (name), ptr, nbytes,
!                           STRING_MULTIBYTE (name), 1);
        }
  
        if ((NILP (echo_string) || SCHARS (echo_string) == 0)
***************
*** 5583,5598 ****
       Lisp_Object symbol;
       int *modifier_end;
  {
!   struct Lisp_String *name;
    int i;
    int modifiers;
  
    CHECK_SYMBOL (symbol);
  
    modifiers = 0;
!   name = XSTRING (SYMBOL_NAME (symbol));
  
!   for (i = 0; i+2 <= STRING_BYTES (name); )
      {
        int this_mod_end = 0;
        int this_mod = 0;
--- 5583,5598 ----
       Lisp_Object symbol;
       int *modifier_end;
  {
!   Lisp_Object name;
    int i;
    int modifiers;
  
    CHECK_SYMBOL (symbol);
  
    modifiers = 0;
!   name = SYMBOL_NAME (symbol);
  
!   for (i = 0; i+2 <= SBYTES (name); )
      {
        int this_mod_end = 0;
        int this_mod = 0;
***************
*** 5601,5607 ****
         Check that the word appears, but don't check what follows it.
         Set this_mod and this_mod_end to record what we find.  */
  
!       switch (name->data[i])
        {
  #define SINGLE_LETTER_MOD(BIT)                                \
          (this_mod_end = i + 1, this_mod = BIT)
--- 5601,5607 ----
         Check that the word appears, but don't check what follows it.
         Set this_mod and this_mod_end to record what we find.  */
  
!       switch (SREF (name, i))
        {
  #define SINGLE_LETTER_MOD(BIT)                                \
          (this_mod_end = i + 1, this_mod = BIT)
***************
*** 5639,5646 ****
  
        /* Check there is a dash after the modifier, so that it
         really is a modifier.  */
!       if (this_mod_end >= STRING_BYTES (name)
!         || name->data[this_mod_end] != '-')
        break;
  
        /* This modifier is real; look for another.  */
--- 5639,5646 ----
  
        /* Check there is a dash after the modifier, so that it
         really is a modifier.  */
!       if (this_mod_end >= SBYTES (name)
!         || SREF (name, this_mod_end) != '-')
        break;
  
        /* This modifier is real; look for another.  */
***************
*** 5651,5659 ****
    /* Should we include the `click' modifier?  */
    if (! (modifiers & (down_modifier | drag_modifier
                      | double_modifier | triple_modifier))
!       && i + 7 == STRING_BYTES (name)
!       && strncmp (name->data + i, "mouse-", 6) == 0
!       && ('0' <= name->data[i + 6] && name->data[i + 6] <= '9'))
      modifiers |= click_modifier;
  
    if (modifier_end)
--- 5651,5659 ----
    /* Should we include the `click' modifier?  */
    if (! (modifiers & (down_modifier | drag_modifier
                      | double_modifier | triple_modifier))
!       && i + 7 == SBYTES (name)
!       && strncmp (SDATA (name) + i, "mouse-", 6) == 0
!       && ('0' <= SREF (name, i + 6) && SREF (name, i + 6) <= '9'))
      modifiers |= click_modifier;
  
    if (modifier_end)
***************
*** 6080,6096 ****
  parse_solitary_modifier (symbol)
       Lisp_Object symbol;
  {
!   struct Lisp_String *name = XSTRING (SYMBOL_NAME (symbol));
  
!   switch (name->data[0])
      {
  #define SINGLE_LETTER_MOD(BIT)                                \
!       if (STRING_BYTES (name) == 1)                   \
        return BIT;
  
  #define MULTI_LETTER_MOD(BIT, NAME, LEN)              \
!       if (LEN == STRING_BYTES (name)                  \
!         && ! strncmp (name->data, NAME, LEN))         \
        return BIT;
  
      case 'A':
--- 6080,6096 ----
  parse_solitary_modifier (symbol)
       Lisp_Object symbol;
  {
!   Lisp_Object name = SYMBOL_NAME (symbol);
  
!   switch (SREF (name, 0))
      {
  #define SINGLE_LETTER_MOD(BIT)                                \
!       if (SBYTES (name) == 1)                         \
        return BIT;
  
  #define MULTI_LETTER_MOD(BIT, NAME, LEN)              \
!       if (LEN == SBYTES (name)                                \
!         && ! strncmp (SDATA (name), NAME, LEN))       \
        return BIT;
  
      case 'A':
***************
*** 9473,9479 ****
    /* Set this_command_keys to the concatenation of saved_keys and
       function, followed by a RET.  */
    {
-     struct Lisp_String *str;
      Lisp_Object *keys;
      int i;
  
--- 9473,9478 ----
***************
*** 9484,9491 ****
      for (i = 0; i < XVECTOR (saved_keys)->size; i++)
        add_command_key (keys[i]);
  
!     str = XSTRING (function);
!     for (i = 0; i < str->size; i++)
        add_command_key (Faref (function, make_number (i)));
  
      add_command_key (make_number ('\015'));
--- 9483,9489 ----
      for (i = 0; i < XVECTOR (saved_keys)->size; i++)
        add_command_key (keys[i]);
  
!     for (i = 0; i < SCHARS (function); i++)
        add_command_key (Faref (function, make_number (i)));
  
      add_command_key (make_number ('\015'));



reply via email to

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