emacs-devel
[Top][All Lists]
Advanced

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

Re: discrepancy between read-key-sequence and manual


From: Richard Stallman
Subject: Re: discrepancy between read-key-sequence and manual
Date: Mon, 11 Sep 2006 15:58:11 -0400

Lots of documentation says that overriding-terminal-local-map
overrides overriding-local-map.  So I think we should make the code
fit all that documentation.

In practice, overriding-local-map is not used very much, so there is
not much chance for there to be code that depends on the current
behavior.

Does this patch do the job?


*** keyboard.c  11 Sep 2006 10:33:19 -0400      1.875
--- keyboard.c  11 Sep 2006 15:44:41 -0400      
***************
*** 8765,8781 ****
       the initial keymaps from the current buffer.  */
    nmaps = 0;
  
!   if (!NILP (current_kboard->Voverriding_terminal_local_map)
!       || !NILP (Voverriding_local_map))
      {
!       if (3 > nmaps_allocated)
        {
!         submaps = (Lisp_Object *) alloca (3 * sizeof (submaps[0]));
!         defs    = (Lisp_Object *) alloca (3 * sizeof (defs[0]));
!         nmaps_allocated = 3;
        }
        if (!NILP (current_kboard->Voverriding_terminal_local_map))
        submaps[nmaps++] = current_kboard->Voverriding_terminal_local_map;
        if (!NILP (Voverriding_local_map))
        submaps[nmaps++] = Voverriding_local_map;
      }
--- 8765,8789 ----
       the initial keymaps from the current buffer.  */
    nmaps = 0;
  
!   if (!NILP (current_kboard->Voverriding_terminal_local_map))
      {
!       if (2 > nmaps_allocated)
        {
!         submaps = (Lisp_Object *) alloca (2 * sizeof (submaps[0]));
!         defs    = (Lisp_Object *) alloca (2 * sizeof (defs[0]));
!         nmaps_allocated = 2;
        }
        if (!NILP (current_kboard->Voverriding_terminal_local_map))
        submaps[nmaps++] = current_kboard->Voverriding_terminal_local_map;
+     }
+   else if (!NILP (Voverriding_local_map))
+     {
+       if (2 > nmaps_allocated)
+       {
+         submaps = (Lisp_Object *) alloca (2 * sizeof (submaps[0]));
+         defs    = (Lisp_Object *) alloca (2 * sizeof (defs[0]));
+         nmaps_allocated = 2;
+       }
        if (!NILP (Voverriding_local_map))
        submaps[nmaps++] = Voverriding_local_map;
      }




reply via email to

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