emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Kim F. Storm
Subject: [Emacs-diffs] Changes to emacs/src/keymap.c
Date: Wed, 12 Feb 2003 18:13:44 -0500

Index: emacs/src/keymap.c
diff -c emacs/src/keymap.c:1.271 emacs/src/keymap.c:1.272
*** emacs/src/keymap.c:1.271    Tue Feb 11 09:35:24 2003
--- emacs/src/keymap.c  Wed Feb 12 18:13:42 2003
***************
*** 97,104 ****
  /* Alist of elements like (DEL . "\d").  */
  static Lisp_Object exclude_keys;
  
! /* Pre-allocated 2-element vector for Fremap_command to use.  */
! static Lisp_Object remap_command_vector;
  
  /* A char with the CHAR_META bit set in a vector or the 0200 bit set
     in a string key sequence is equivalent to prefixing with this
--- 97,104 ----
  /* Alist of elements like (DEL . "\d").  */
  static Lisp_Object exclude_keys;
  
! /* Pre-allocated 2-element vector for Fcommand_remapping to use.  */
! static Lisp_Object command_remapping_vector;
  
  /* A char with the CHAR_META bit set in a vector or the 0200 bit set
     in a string key sequence is equivalent to prefixing with this
***************
*** 1068,1074 ****
  
  /* This function may GC (it calls Fkey_binding).  */
  
! DEFUN ("remap-command", Fremap_command, Sremap_command, 1, 1, 0,
         doc: /* Return the remapping for command COMMAND in current keymaps.
  Returns nil if COMMAND is not remapped (or not a symbol).  */)
       (command)
--- 1068,1074 ----
  
  /* This function may GC (it calls Fkey_binding).  */
  
! DEFUN ("command-remapping", Fcommand_remapping, Scommand_remapping, 1, 1, 0,
         doc: /* Return the remapping for command COMMAND in current keymaps.
  Returns nil if COMMAND is not remapped (or not a symbol).  */)
       (command)
***************
*** 1077,1084 ****
    if (!SYMBOLP (command))
      return Qnil;
  
!   ASET (remap_command_vector, 1, command);
!   return Fkey_binding (remap_command_vector, Qnil, Qt);
  }
  
  /* Value is number if KEY is too long; nil if valid but has no definition. */
--- 1077,1084 ----
    if (!SYMBOLP (command))
      return Qnil;
  
!   ASET (command_remapping_vector, 1, command);
!   return Fkey_binding (command_remapping_vector, Qnil, Qt);
  }
  
  /* Value is number if KEY is too long; nil if valid but has no definition. */
***************
*** 1490,1496 ****
    if (NILP (no_remap) && SYMBOLP (value))
      {
        Lisp_Object value1;
!       if (value1 = Fremap_command (value), !NILP (value1))
        value = value1;
      }
  
--- 1490,1496 ----
    if (NILP (no_remap) && SYMBOLP (value))
      {
        Lisp_Object value1;
!       if (value1 = Fcommand_remapping (value), !NILP (value1))
        value = value1;
      }
  
***************
*** 2257,2263 ****
    if (NILP (no_remap) && SYMBOLP (definition))
      {
        Lisp_Object tem;
!       if (tem = Fremap_command (definition), !NILP (tem))
        return Qnil;
      }
  
--- 2257,2263 ----
    if (NILP (no_remap) && SYMBOLP (definition))
      {
        Lisp_Object tem;
!       if (tem = Fcommand_remapping (definition), !NILP (tem))
        return Qnil;
      }
  
***************
*** 3644,3651 ****
    Qremap = intern ("remap");
    staticpro (&Qremap);
  
!   remap_command_vector = Fmake_vector (make_number (2), Qremap);
!   staticpro (&remap_command_vector);
  
    where_is_cache_keymaps = Qt;
    where_is_cache = Qnil;
--- 3644,3651 ----
    Qremap = intern ("remap");
    staticpro (&Qremap);
  
!   command_remapping_vector = Fmake_vector (make_number (2), Qremap);
!   staticpro (&command_remapping_vector);
  
    where_is_cache_keymaps = Qt;
    where_is_cache = Qnil;
***************
*** 3659,3665 ****
    defsubr (&Smake_keymap);
    defsubr (&Smake_sparse_keymap);
    defsubr (&Scopy_keymap);
!   defsubr (&Sremap_command);
    defsubr (&Skey_binding);
    defsubr (&Slocal_key_binding);
    defsubr (&Sglobal_key_binding);
--- 3659,3665 ----
    defsubr (&Smake_keymap);
    defsubr (&Smake_sparse_keymap);
    defsubr (&Scopy_keymap);
!   defsubr (&Scommand_remapping);
    defsubr (&Skey_binding);
    defsubr (&Slocal_key_binding);
    defsubr (&Sglobal_key_binding);




reply via email to

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