From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Proposed patches Date: 25 Feb 2004 08:00:28 +0900 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87vflwhylv.fsf@tc-1-100.kawasaki.gol.ne.jp> Reply-To: Miles Bader NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1077664235 29610 80.91.224.253 (24 Feb 2004 23:10:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 24 Feb 2004 23:10:35 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Feb 25 00:10:19 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Avlgw-0007s6-00 for ; Wed, 25 Feb 2004 00:10:18 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Avlgw-0005ZP-00 for ; Wed, 25 Feb 2004 00:10:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1Avlg3-0006RU-QN for emacs-devel@quimby.gnus.org; Tue, 24 Feb 2004 18:09:23 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1Avlb5-0004sD-J7 for emacs-devel@gnu.org; Tue, 24 Feb 2004 18:04:15 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1AvlWI-0002Gr-QZ for emacs-devel@gnu.org; Tue, 24 Feb 2004 17:59:51 -0500 Original-Received: from [203.216.5.131] (helo=smtp01.fields.gol.com) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AvlWH-0002Eu-0C; Tue, 24 Feb 2004 17:59:17 -0500 Original-Received: from filter01.fields.gol.com ([203.216.5.148] helo=localhost) by smtp01.fields.gol.com with esmtp (Magnetic Fields) id 1AvlWC-0002bP-8S; Wed, 25 Feb 2004 07:59:12 +0900 Original-Received: from yokohama1-61-203-152-16.ap.0038.net ([61.203.152.16] helo=tc-1-100.kawasaki.gol.ne.jp) by smtp01.fields.gol.com with asmtp (Magnetic Fields) id 1AvlWA-0002a9-Tf; Wed, 25 Feb 2004 07:59:11 +0900 Original-Received: by tc-1-100.kawasaki.gol.ne.jp (Postfix, from userid 1000) id 179ED2FAC; Wed, 25 Feb 2004 08:00:28 +0900 (JST) Original-To: emacs-devel@gnu.org System-Type: i686-pc-linux-gnu Original-Lines: 35 X-Virus-Scanned: by AMaViS GOL X-Abuse-Complaints: abuse@gol.com X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:20164 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:20164 --=-=-= Hi, The following patches are from my emacs tiling branch, and fix a number of annoying crash bugs, but also seem to apply equally well to CVS HEAD (however, at least in the case of the third patch, I couldn't actually reproduce the crash using CVS HEAD). Do these changes look alright to people? [If I don't hear any complaints, I'll apply them to CVS] Thanks, -Miles patch-1: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=patch-1 Content-Description: patch-1 2004-02-10 Miles Bader * xfns.c (lookup_image): Remove xassert(!interrupt_input_blocked); BLOCK_INPUT can be nested, so it doesn't make much sense. --- orig/src/xfns.c +++ mod/src/xfns.c @@ -1,5 +1,5 @@ /* Functions for the X window system. - Copyright (C) 1989, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 01, 02, 03 + Copyright (C) 1989, 92, 93, 94, 95, 96, 97, 98, 99, 2000,01,02,03,04 Free Software Foundation. This file is part of GNU Emacs. @@ -5414,7 +5414,6 @@ } UNBLOCK_INPUT; - xassert (!interrupt_input_blocked); } /* We're using IMG, so set its timestamp to `now'. */ --=-=-= patch-2: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=patch-2 Content-Description: patch-2 2004-02-11 Miles Bader * xdisp.c (produce_image_glyph): Force negative descents to zero. --- orig/src/xdisp.c +++ mod/src/xdisp.c @@ -17827,6 +17827,11 @@ it->descent = it->phys_descent = img->height + 2 * img->vmargin - it->ascent; it->pixel_width = img->width + 2 * img->hmargin; + /* It's quite possible for images to have an ascent greater than + their height, so don't get confused in that case. */ + if (it->descent < 0) + it->descent = 0; + /* If this glyph is alone on the last line, adjust it.ascent to minimum row ascent. */ face_ascent = face->font ? FONT_BASE (face->font) : FRAME_BASELINE_OFFSET (it->f); if (face_ascent > it->ascent) --=-=-= patch-3: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=patch-3 Content-Description: patch-3 2004-02-25 Miles Bader * xdisp.c (check_it): Check string/string_pos consistency. (init_iterator): Initialize string-related fields properly. --- orig/src/xdisp.c +++ mod/src/xdisp.c @@ -1905,10 +1905,14 @@ xassert (STRINGP (it->string)); xassert (IT_STRING_CHARPOS (*it) >= 0); } - else if (it->method == next_element_from_buffer) + else { - /* Check that character and byte positions agree. */ - xassert (IT_CHARPOS (*it) == BYTE_TO_CHAR (IT_BYTEPOS (*it))); + xassert (IT_STRING_CHARPOS (*it) < 0); + if (it->method == next_element_from_buffer) + { + /* Check that character and byte positions agree. */ + xassert (IT_CHARPOS (*it) == BYTE_TO_CHAR (IT_BYTEPOS (*it))); + } } if (it->dpvec) @@ -2021,6 +2025,8 @@ it->current.overlay_string_index = -1; it->current.dpvec_index = -1; it->base_face_id = base_face_id; + it->string = Qnil; + IT_STRING_CHARPOS (*it) = IT_STRING_BYTEPOS (*it) = -1; /* The window in which we iterate over current_buffer: */ XSETWINDOW (it->window, w); --=-=-= -- Run away! Run away! --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel --=-=-=--