From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Eli Zaretskii" Newsgroups: gmane.emacs.help Subject: Re: scroll-down and beginning-of-buffer Date: Fri, 07 Jan 2005 19:58:56 +0200 Message-ID: <01c4f4e2$Blat.v2.2.2$b768c720@zahav.net.il> References: NNTP-Posting-Host: deer.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7BIT X-Trace: sea.gmane.org 1105121507 13076 80.91.229.6 (7 Jan 2005 18:11:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 7 Jan 2005 18:11:47 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 07 19:11:30 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CmyaA-0004aZ-00 for ; Fri, 07 Jan 2005 19:11:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CmylW-00062P-AF for geh-help-gnu-emacs@m.gmane.org; Fri, 07 Jan 2005 13:23:14 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CmylH-00060L-DT for help-gnu-emacs@gnu.org; Fri, 07 Jan 2005 13:22:59 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CmylG-0005zt-Hf for help-gnu-emacs@gnu.org; Fri, 07 Jan 2005 13:22:58 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CmylG-0005zp-Cb for help-gnu-emacs@gnu.org; Fri, 07 Jan 2005 13:22:58 -0500 Original-Received: from [192.114.186.66] (helo=romy.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CmyQa-0002lk-4Y for help-gnu-emacs@gnu.org; Fri, 07 Jan 2005 13:01:36 -0500 Original-Received: from zaretski (IGLD-83-130-209-249.inter.net.il [83.130.209.249]) by romy.inter.net.il (MOS 3.5.6-GR) with ESMTP id AFR34705 (AUTH halo1); Fri, 7 Jan 2005 20:01:24 +0200 (IST) Original-To: help-gnu-emacs@gnu.org X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 2.2.2 In-reply-to: (message from Paul Raines on Fri, 7 Jan 2005 12:05:31 -0500 (EST)) 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: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:23199 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:23199 > Date: Fri, 7 Jan 2005 12:05:31 -0500 (EST) > From: Paul Raines > > (defun my-scroll-down (arg) > "Same as scroll-down except really goes to beginning of file" > (interactive "P") > (if (not (call-interactively 'scroll-down)) > (call-interactively 'beginning-of-buffer))) > > Which works but has the horrible side effect of reseting the mark > each time it is used to the region scrolled. How do I stop it > from doing that? If you call pop-mark after beginning-of-buffer, it will restore the mark to what it was before that. Alternatively, replace the call to beginning-of-buffer with a loop that moves one line backwards until it hits the first line. > Or is the better way to get what I want? A better way would be to get used to what Emacs does when you press PageDown repeatedly ;-) Anyway, why did you invoke scroll-down and beginning-of-buffer via call-interactively? Why not simply call (scroll-down) and (beginning-of-buffer)?