Article View: gnu.emacs.bug
Article #87725Bug in command_loop_1 direct commands optimization. (Hope, is already fixed)
From: Valeriy E. Ushakov (aka Uwe)
Date: Mon, 05 Sep 1994 17:51
Date: Mon, 05 Sep 1994 17:51
65 lines
3693 bytes
3693 bytes
In GNU Emacs 19.25.1 of Mon Sep 5 1994 on snark (sparc-sun-sunos4.1.3)
Hi!
I've got a minor problem with display tables in 19.25: nil entries in
a table were displayed incorrectly before \n or end of buffer. My
investigation shows that the problem is in keyboard.c (command_loop_1)
optimizations for "some common commands in common situations". I think
this was the last change before 19.25 release (see the release
ChangeLog entry).
When direct_output_for_insert in presence of display table, for nil
entries obj==Qnil (the entry itself) is passed instead of the char
typed.
I believe that this is already fixed (many people use disp tables ;-),
but I'm sending the fix just in a case... The workaround with explicit
table entries for ascii is also works (in case you cannot rebuild
emacs right now).
The fix is:
*** keyboard.c-dist Mon May 30 15:02:53 1994
--- keyboard.c Mon Sep 5 12:55:13 1994
***************
*** 1162,1174 ****
Lisp_Object obj;
obj = DISP_CHAR_VECTOR (dp, lose);
if (NILP (obj)
! || (XTYPE (obj) == Lisp_Vector
! && XVECTOR (obj)->size == 1
! && (XTYPE (obj = XVECTOR (obj)->contents[0])
! == Lisp_Int)
! /* Insist face not specified in glyph. */
! && (XINT (obj) & ((-1) << 8)) == 0))
no_redisplay
= direct_output_for_insert (XINT (obj));
}
--- 1162,1178 ----
Lisp_Object obj;
obj = DISP_CHAR_VECTOR (dp, lose);
+ /* Fix: Check for nil separately or we direct nil */
if (NILP (obj)
! && (lose >= 0x20 && lose <= 0x7e))
! no_redisplay
! = direct_output_for_insert (lose);
! else if (XTYPE (obj) == Lisp_Vector
! && XVECTOR (obj)->size == 1
! && (XTYPE (obj = XVECTOR (obj)->contents[0])
! == Lisp_Int)
! /* Insist face not specified in glyph. */
! && (XINT (obj) & ((-1) << 8)) == 0)
no_redisplay
= direct_output_for_insert (XINT (obj));
}
Best regards!
SY, Uwe.
--------
Valeriy E. Ushakov (aka Uwe) | Zu Grunde kommen
uwe@niif.spb.su | Ist zu Grunde gehen
Technical Details
Message-ID:
<9409050901.AA25432@snoopy.niif.spb.su>Path:
arc1-ca.pugleaf.net!nntp.gmd.de!newsserver.jvnc.net!yale.edu!yale!yale!zip.eecs.umich.edu!newsxfer.itd.umich.edu!europa.eng.gtefsd.com!MathWorks.Com!news.duke.edu!news-feed-1.peachnet.edu!gatech!howland.reston.ans.net!math.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!snoopy.niif.spb.su!uweShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,97bb403fda6ae9dc,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1994-09-05 18:44:21 PST Path: arc1-ca.pugleaf.net!nntp.gmd.de!newsserver.jvnc.net!yale.edu!yale!yale!zip.eecs.umich.edu!newsxfer.itd.umich.edu!europa.eng.gtefsd.com!MathWorks.Com!news.duke.edu!news-feed-1.peachnet.edu!gatech!howland.reston.ans.net!math.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!snoopy.niif.spb.su!uwe From: uwe@snoopy.niif.spb.su (Valeriy E. Ushakov (aka Uwe)) Newsgroups: gnu.emacs.bug Subject: Bug in command_loop_1 direct commands optimization. (Hope, is already fixed) Date: 5 Sep 1994 13:51:38 -0400 Organization: GNUs Not Usenet Lines: 65 Sender: daemon@cis.ohio-state.edu Approved: bug-gnu-emacs@prep.ai.mit.edu Distribution: gnu Message-ID: <9409050901.AA25432@snoopy.niif.spb.su>