🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #88052

Bug in xscheme, plus fix (to keymap.c)

#88052
From: Bill Sommerfeld
Date: Sat, 06 Aug 1994 00:49
55 lines
2564 bytes
In GNU Emacs 19.25.16 of Fri Jul  1 1994 on snarfblatt (hppa1.1-hp-hpux9)

When using M-x run-scheme with MIT Scheme, if you drop into the
debugger (by typing (debug) ESC RET to the scheme subprocess in the
*scheme* buffer), the first character entered after the *scheme*
buffer switches into the scheme debugger mode is interpreted in the
context of the previous keymap; this is because the keymap used to
interpret a character is fixed at the time emacs first blocks waiting
for that character.

To reproduce this problem:
	- install MIT Scheme
	- start emacs -q
	- type M-x run-scheme
	- wait for scheme to finish initializing.
	- type a test form (to make sure scheme is running)
	( + 1 1 ) ESC RET
	- enter the Scheme debugger:
	( d e b u g ) ESC RET
	- wait until the mode changes to Scheme Debugger mode.
	- type a "?", to see the list of debugger commands; observe
	that it merely inserts a "?".
	- type another "?", and see the list of debugger commands now
	that the mode switch is really complete.

The enclosed patch fixes this, by taking advantage of the existing
code in keyboard.c which notices asynchronous buffer changes and
interprets pending input in the context of the new keymap and buffer.
Note that the patched functions are use-global-map and use-local-map.

					- Bill

*** keymap.c.~1~	Thu Aug  4 21:05:46 1994
--- keymap.c	Fri Aug  5 16:44:34 1994
***************
*** 1071,1076 ****
--- 1071,1078 ----
  {
    keymap = get_keymap (keymap);
    current_global_map = keymap;
+   record_asynch_buffer_change ();
+ 
    return Qnil;
  }
  
***************
*** 1084,1089 ****
--- 1086,1092 ----
      keymap = get_keymap (keymap);
  
    current_buffer->keymap = keymap;
+   record_asynch_buffer_change ();
  
    return Qnil;
  }
Technical Details
Message-ID: <9408052113.AA03833@life.ai.mit.edu>
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!uunet!meaddata!ddsw1!panix!MathWorks.Com!news.duke.edu!news-feed-1.peachnet.edu!gatech!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!apollo.hp.com!sommerfeld

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,b2d11c13774e8d69,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1994-08-06 18:41:30 PST
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!uunet!meaddata!ddsw1!panix!MathWorks.Com!news.duke.edu!news-feed-1.peachnet.edu!gatech!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!apollo.hp.com!sommerfeld
From: sommerfeld@apollo.hp.com (Bill Sommerfeld)
Newsgroups: gnu.emacs.bug
Subject: Bug in xscheme, plus fix (to keymap.c)
Date: 5 Aug 1994 20:49:31 -0400
Organization: GNUs Not Usenet
Lines: 57
Sender: daemon@cis.ohio-state.edu
Approved: bug-gnu-emacs@prep.ai.mit.edu
Distribution: gnu
Message-ID: <9408052113.AA03833@life.ai.mit.edu>