From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Greg Hill Newsgroups: gmane.emacs.help Subject: Re: Re: scroll behaviour during query-replace etc Date: Fri, 8 Oct 2004 13:39:27 -0700 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0197323508==" X-Trace: sea.gmane.org 1097281084 2406 80.91.229.6 (9 Oct 2004 00:18:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 9 Oct 2004 00:18:04 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 09 02:17:58 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CG4vt-00063u-00 for ; Sat, 09 Oct 2004 02:17:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CG52h-0008IJ-Tm for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Oct 2004 20:25:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CG518-0007Jb-Hu for help-gnu-emacs@gnu.org; Fri, 08 Oct 2004 20:23:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CG517-0007IM-8A for help-gnu-emacs@gnu.org; Fri, 08 Oct 2004 20:23:21 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CG517-0007IG-23 for help-gnu-emacs@gnu.org; Fri, 08 Oct 2004 20:23:21 -0400 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CG4pC-0001ve-IZ for help-gnu-emacs@gnu.org; Fri, 08 Oct 2004 20:11:02 -0400 Original-Received: from [207.158.54.5] (helo=renfield.synergymicro.com) by mx20.gnu.org with esmtp (Exim 4.34) id 1CG1YO-00040J-Gv for help-gnu-emacs@gnu.org; Fri, 08 Oct 2004 16:41:28 -0400 Original-Received: from synergy.san.synergymicro.com (synergy.san.synergymicro.com [10.1.2.12]) by renfield.synergymicro.com (8.12.10/8.12.10) with ESMTP id i98KhmmQ027075 for ; Fri, 8 Oct 2004 13:43:48 -0700 Original-Received: from [10.1.5.75] ([10.1.5.75]) by synergy.san.synergymicro.com (8.12.10/8.12.10) with ESMTP id i98KfAY9013879 for ; Fri, 8 Oct 2004 13:41:10 -0700 Original-To: help-gnu-emacs@gnu.org X-Virus-Scanned: clamd / ClamAV version 0.70, clamav-milter version 0.70j X-CanItPRO-Stream: default X-Canit-Stats-ID: 360348 - 7f5eec1c4ae6 X-Scanned-By: CanIt (www . canit . ca) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:21147 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:21147 --===============0197323508== Content-Type: multipart/alternative; boundary="============_-1114854528==_ma============" --============_-1114854528==_ma============ Content-Type: text/plain; charset="us-ascii" ; format="flowed" Gordon, Come to think of it, you might like this better. (defadvice search-forward (after view-context compile activate disable) (if (< (count-lines (point) (window-end)) scroll-margin) (recenter (- scroll-margin)))) --Greg --============_-1114854528==_ma============ Content-Type: text/html; charset="us-ascii" Re: Re: scroll behaviour during query-replace etc
Gordon,

Come to think of it, you might like this better.

(defadvice search-forward (after view-context compile activate disable)
  (if (< (count-lines (point) (window-end)) scroll-margin)
      (recenter (- scroll-margin))))

--Greg
--============_-1114854528==_ma============-- --===============0197323508== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --===============0197323508==--