From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs Subject: Re: hit end-of-buffer key twice, now where was I? Date: Tue, 12 Oct 2004 10:31:17 -0600 Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <416C06D5.2010807@yahoo.com> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1097598718 30330 80.91.229.6 (12 Oct 2004 16:31:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 12 Oct 2004 16:31:58 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 12 18:31:48 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 1CHPYy-00037b-00 for ; Tue, 12 Oct 2004 18:31:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CHPfx-00029j-OV for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Oct 2004 12:39:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CHPfw-00029D-9x for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2004 12:39:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CHPfv-000283-40 for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2004 12:38:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CHPfv-00027s-1j for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2004 12:38:59 -0400 Original-Received: from [193.4.58.12] (helo=horus.isnic.is) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CHPYV-0003kE-O9 for bug-gnu-emacs@gnu.org; Tue, 12 Oct 2004 12:31:20 -0400 Original-Received: from Mail.FU-Berlin.DE (mail.fu-berlin.de [130.133.1.2]) by horus.isnic.is (8.12.9p2/8.12.9/isnic) with ESMTP id i9CGVGuC056111 for ; Tue, 12 Oct 2004 16:31:16 GMT (envelope-from mod-submit@uni-berlin.de) Original-Received: by Mail.FU-Berlin.DE (Exim 4.42) from curry.zedat.fu-berlin.de ([160.45.10.36]) for gnu-emacs-bug@moderators.isc.org with esmtp id <1CHPYS-0007lw-4J>; Tue, 12 Oct 2004 18:31:16 +0200 Original-Received: by Curry.ZEDAT.FU-Berlin.DE (Smail3.2.0.98) from news.uni-berlin.de with bsmtp id ; Tue, 12 Oct 2004 18:31:16 +0200 (MEST) Original-To: gnu-emacs-bug@moderators.isc.org Original-Path: not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 28 X-Orig-X-Trace: news.uni-berlin.de uKJFBxnQEawXTcnfEsndegDkq+07Arda02Mgjd5AVBvcWj/M4= User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:9286 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:9286 Dan Jacobson wrote: > Hit the key you bind to end-of-buffer twice by accident. Notice how > now exchange-point-and-mark will not get you back to where you were. C-x C-x C-u C-SPC C-u C-SPC > There ought to be boob protection. Same for beginning-of-buffer. > "Who would ever need to store a mark if the distance is 0?" perhaps? Only boobs need boob protection: (defadvice end-of-buffer (around eob-disable activate) "When called interactively at the end of the buffer, do nothing. This prevents the mark from being reset." (or (and (interactive-p) (eobp)) ad-do-it)) (defadvice beginning-of-buffer (around bob-disable activate) "When called interactively at the beginning of the buffer, do nothing. This prevents the mark from being reset." (or (and (interactive-p) (bobp)) ad-do-it)) -- Kevin Rodgers