Article View: gnu.emacs.bug
Article #87620delayed activation of local keymap?
From: goldman
Date: Fri, 09 Sep 1994 21:17
Date: Fri, 09 Sep 1994 21:17
36 lines
2336 bytes
2336 bytes
In GNU Emacs 19.22.9 of Tue Jun 21 1994 on rodan.isi.edu (hpux) I have been porting a body of code from emacs-18 (acutally, EPOCH) to emacs-19. The problem below did not occur in EPOCH. I have a process P whose filter function changes the mode of a buffer B, and thus also changes B's local keymap to K. Suppose B is the current-buffer in the selected window when this occurs. I see B's mode line change to indicate the new mode. However, the first character I type after this (say, the letter A) is executed according to its binding in global-map, not its binding in K. Every keystroke thereafter is executed correctly, using the binding in K if one exists. I know that the incorrect execution is coming from the key binding in the default global map, because I bound it there to a function of my own that is not called anywhere else. Also, when this function is called, (current-local-map) does return K, and lookup-key does find a binding in K for the key. If, however, the filter function runs when some other window, showing a different buffer, is selected, and I INTERACTIVELY switch windows (C-x o) to the one showing B, then the first keystroke I input to B IS executed according to its binding in K. FYI -- The binding of my key in the default global map is the one that would be found if the key were being looked up from the original mode (prior to the execution of the process filter function), because that mode's local keymap has no binding for the keystroke. Also, there is no race condition or typeahead here -- I do not enter the keystroke until a few seconds AFTER the process-filter function has returned and the mode line shows the new mode. neil goldman
Technical Details
Message-ID:
<9409092115.AA22887@hpai12.isi.edu>Path:
arc1-ca.pugleaf.net!nntp.gmd.de!Germany.EU.net!EU.net!howland.reston.ans.net!math.ohio-state.edu!cis.ohio-state.edu!isi.edu!goldmanShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,a9adf31774f0e623,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1994-09-12 18:27:38 PST Path: arc1-ca.pugleaf.net!nntp.gmd.de!Germany.EU.net!EU.net!howland.reston.ans.net!math.ohio-state.edu!cis.ohio-state.edu!isi.edu!goldman From: goldman@isi.edu Newsgroups: gnu.emacs.bug Subject: delayed activation of local keymap? Date: 9 Sep 1994 17:17:30 -0400 Organization: GNUs Not Usenet Lines: 36 Sender: daemon@cis.ohio-state.edu Approved: bug-gnu-emacs@prep.ai.mit.edu Distribution: gnu Message-ID: <9409092115.AA22887@hpai12.isi.edu>