hartzell@BOULDER.COLORADO.EDU (George Hartzell) (07/19/89)
I posted a message a few days ago reporting a problem that I was having with gnu-emacs 18.54, X, and a DECstation 3100. The symptoms were (after a variable length of time and/or number of keystrokes, never narrowed it down) a) keyclick was turned on and b) some keystrokes needed to be entered 3 times before they produced the expected result, the first stroke disappeared and the second one generated a beep. Two other people reported similar problems. One of them, Paul Calder, contributed the explanation and patch included below, which seems to have corrected the problem for me. He also gave me permission to pass this patch on to you. g. George Hartzell (303) 492-4535 MCD Biology, University of Colorado-Boulder, Boulder, CO 80309 hartzell@Boulder.Colorado.EDU ..!{ncar,nbires}!boulder!hartzell =========================================================================== From calder@aramis.Stanford.EDU Tue Jul 18 11:18:17 1989 Received: by beagle.colorado.edu (cu.generic.041888) Received: by spike.colorado.edu (cu.generic.041888) Received: by aramis.Stanford.EDU (5.57/Ultrix3.0-C) id AA26276; Tue, 18 Jul 89 10:15:39 PDT Date: Tue, 18 Jul 89 10:15:39 PDT From: calder@aramis.stanford.edu (Paul Calder) Message-Id: <8907181715.AA26276@aramis.Stanford.EDU> To: hartzell@spike.colorado.edu Subject: Re: DS3100, Gnu-emacs, and X11 Reply-To: calder@lurch.stanford.edu Status: RO Hi, A friend forwarded me your net news posting about a bug in gnuemacs on a DECstation 3100. We also had this same bug, on both 3100 and 3200 workstations. *Most* annoying! The problem is that an uninitialized data structure is being passed to XLookupString. The parameter is used to implement multi-keystroke characters, a feature which is not needed in gnuemacs. The fix is simply to pass the value NULL, which disables mulit-key processing. Here's a patch on top of 18.54 ======================================================================== *** x11term.c.old Thu Apr 6 10:45:19 1989 --- x11term.c Mon May 1 19:09:08 1989 *************** *** 1214,1220 **** char mapping_buf[20]; BLOCK_INPUT_DECLARE (); XEvent event; - XComposeStatus status; KeySym keysym; BLOCK_INPUT (); --- 1214,1219 ---- *************** *** 1319,1327 **** break; case KeyPress: ! nbytes = XLookupString (&event, ! mapping_buf, 20, &keysym, ! &status); /* Someday this will be unnecessary as we will be able to use XRebindKeysym so XLookupString will have already given us the string we want. */ --- 1318,1324 ---- break; case KeyPress: ! nbytes = XLookupString (&event, mapping_buf, 20, &keysym, NULL); /* Someday this will be unnecessary as we will be able to use XRebindKeysym so XLookupString will have already given us the string we want. */ ====================================================================== Hope this fixes your problem! By the way, feel free to post this patch if you think it's useful. I don't read the relevant groups. Cheers, Paul Calder