From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: show-paren-mode prevents page-down from displaying next 1/2 page. Date: Wed, 18 Apr 2007 18:26:52 -0400 Message-ID: <873b2xgvyr.fsf@stupidchicken.com> References: <1F26F4742242BA449B1716A3A1E93EC60BF74573@BFTMLVEM02.e2k.ad.ge.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1176935101 3049 80.91.229.12 (18 Apr 2007 22:25:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 18 Apr 2007 22:25:01 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: "Maguire\, Andrew \(GE Infra\, Energy\)" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 19 00:24:54 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HeIa5-00079G-IR for ged-emacs-devel@m.gmane.org; Thu, 19 Apr 2007 00:24:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HeIex-0000YO-Sd for ged-emacs-devel@m.gmane.org; Wed, 18 Apr 2007 18:29:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HeIeu-0000VU-0W for emacs-devel@gnu.org; Wed, 18 Apr 2007 18:29:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HeIes-0000TC-LO for emacs-devel@gnu.org; Wed, 18 Apr 2007 18:29:51 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HeIes-0000Sz-F3 for emacs-devel@gnu.org; Wed, 18 Apr 2007 18:29:50 -0400 Original-Received: from cyd.mit.edu ([18.19.1.138]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HeIZy-0004X5-MB; Wed, 18 Apr 2007 18:24:46 -0400 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id C43A34E45F; Wed, 18 Apr 2007 18:26:52 -0400 (EDT) In-Reply-To: <1F26F4742242BA449B1716A3A1E93EC60BF74573@BFTMLVEM02.e2k.ad.ge.com> (Andrew Maguire's message of "Wed\, 18 Apr 2007 15\:32\:48 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.98 (gnu/linux) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:69592 Archived-At: "Maguire, Andrew (GE Infra, Energy)" writes: > Here goes: > > (require 'cl-macs) > (defun test:scroll-up:show-paren-mode () > ... This glitch occurs because show-paren-mode tries to highlight before window-start, which forces the redisplay engine to recenter. It's no big deal, but I believe this patch fixes it. Could someone help me double-check? *** emacs/lisp/paren.el.~1.71.~ 2007-01-21 13:34:19.000000000 -0500 --- emacs/lisp/paren.el 2007-04-18 18:25:16.000000000 -0400 *************** *** 146,152 **** pos mismatch face) ;; ;; Find the other end of the sexp. ! (when dir (save-excursion (save-restriction ;; Determine the range within which to look for a match. --- 146,154 ---- pos mismatch face) ;; ;; Find the other end of the sexp. ! (when (or (= dir 1) ! (and (= dir -1) ! (>= (1- (point)) (window-start)))) (save-excursion (save-restriction ;; Determine the range within which to look for a match.