From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: Re: [RFC] using "optimizaiton 1" Date: Fri, 14 Dec 2012 20:47:28 +0400 Message-ID: <50CB5820.3060909@yandex.ru> References: <50CB3342.1020703@yandex.ru> <83y5h0n2jf.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1355503661 32716 80.91.229.3 (14 Dec 2012 16:47:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Dec 2012 16:47:41 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 14 17:47:54 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TjYQU-0002AD-70 for ged-emacs-devel@m.gmane.org; Fri, 14 Dec 2012 17:47:54 +0100 Original-Received: from localhost ([::1]:37350 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjYQH-0004yr-5q for ged-emacs-devel@m.gmane.org; Fri, 14 Dec 2012 11:47:41 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:34526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjYQB-0004m4-Qm for emacs-devel@gnu.org; Fri, 14 Dec 2012 11:47:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TjYQA-0002wx-Lv for emacs-devel@gnu.org; Fri, 14 Dec 2012 11:47:35 -0500 Original-Received: from forward11.mail.yandex.net ([95.108.130.93]:49545) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjYQ8-0002w2-Mp; Fri, 14 Dec 2012 11:47:33 -0500 Original-Received: from smtp13.mail.yandex.net (smtp13.mail.yandex.net [95.108.130.68]) by forward11.mail.yandex.net (Yandex) with ESMTP id 74DB1E82382; Fri, 14 Dec 2012 20:47:29 +0400 (MSK) Original-Received: from smtp13.mail.yandex.net (localhost [127.0.0.1]) by smtp13.mail.yandex.net (Yandex) with ESMTP id 4E65EE4057C; Fri, 14 Dec 2012 20:47:29 +0400 (MSK) Original-Received: from unknown (unknown [37.139.80.10]) by smtp13.mail.yandex.net (nwsmtp/Yandex) with ESMTP id lSsChnsA-lTsao8Ni; Fri, 14 Dec 2012 20:47:29 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1355503649; bh=EvLA/8z+gGfQanrkSBESqMFeVLAkb0GK4LfCJCYfRYI=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=qLx2NzNpKH8tUp0wHCYRDLJg045w1bV03MbImpHAB/PieQ1cra7477YL8BfIr3t0s EpzPXduQrs48tNX+4KjhB2/ufpy6GVVwwJY3igYAhS1vmvJuY44knjz0n3yQrP+Bal PM3aS03CQyBqMJL0ZbErGdpASddVkzbGhNRVuvyE= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: <83y5h0n2jf.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 95.108.130.93 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:155558 Archived-At: On 12/14/2012 06:15 PM, Eli Zaretskii wrote: >> Date: Fri, 14 Dec 2012 18:10:10 +0400 >> From: Dmitry Antipov >> CC: Eli Zaretskii >> >> Surprisingly, "optimizaiton 1" from redisplay_internal can >> handle the case if the region is highlighted, too. Comments? > > Sorry, I don't understand: handle which case? IOW, I suspect that this code: 13248 /* If showing the region, and mark has changed, we must redisplay 13249 the whole window. The assignment to this_line_start_pos prevents 13250 the optimization directly below this if-statement. */ 13251 if (((!NILP (Vtransient_mark_mode) 13252 && !NILP (BVAR (XBUFFER (w->buffer), mark_active))) 13253 != !NILP (w->region_showing)) 13254 || (!NILP (w->region_showing) 13255 && !EQ (w->region_showing, 13256 Fmarker_position (BVAR (XBUFFER (w->buffer), mark))))) 13257 CHARPOS (this_line_start_pos) = 0; is obsolete (heh, it's there since 1993). If showing the region, and both PT and mark are on the same line, we should go through the monster if-statement below to: 13293 /* We have to handle the case of continuation around a 13294 wide-column character (see the comment in indent.c around 13295 line 1340). Dmitry