unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: discrepancy between read-key-sequence and manual
Date: Mon, 11 Sep 2006 15:58:11 -0400	[thread overview]
Message-ID: <E1GMrv1-0007te-G1@fencepost.gnu.org> (raw)
In-Reply-To: <85lkoqh64k.fsf@lola.goethe.zz> (message from David Kastrup on Mon, 11 Sep 2006 15:42:19 +0200)

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;
      }

  parent reply	other threads:[~2006-09-11 19:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-11 13:42 discrepancy between read-key-sequence and manual David Kastrup
2006-09-11 14:20 ` Kim F. Storm
2006-09-11 14:25   ` David Kastrup
2006-09-11 19:58 ` Richard Stallman [this message]
2006-09-11 20:05   ` David Kastrup

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1GMrv1-0007te-G1@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).