From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.devel Subject: Re: a simple convenience function Date: Mon, 15 Nov 2004 03:49:57 +0200 Message-ID: <200411150349.57864.pogonyshev@gmx.net> References: <200411142336.00131.pogonyshev@gmx.net> <20041114233449.GC12968@fencepost> <001001c4caa9$5105b9b0$0200a8c0@sedrcw11488> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1100483806 19052 80.91.229.6 (15 Nov 2004 01:56:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 15 Nov 2004 01:56:46 +0000 (UTC) Cc: emacs-devel@gnu.org, Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 15 02:56:36 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 1CTW6d-000339-00 for ; Mon, 15 Nov 2004 02:56:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CTWFJ-000275-HG for ged-emacs-devel@m.gmane.org; Sun, 14 Nov 2004 21:05:33 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CTWFD-00026z-OO for emacs-devel@gnu.org; Sun, 14 Nov 2004 21:05:27 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CTWFD-00026n-Bt for emacs-devel@gnu.org; Sun, 14 Nov 2004 21:05:27 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CTWFD-00026k-9e for emacs-devel@gnu.org; Sun, 14 Nov 2004 21:05:27 -0500 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1CTW6S-0005Ll-Nb for emacs-devel@gnu.org; Sun, 14 Nov 2004 20:56:25 -0500 Original-Received: (qmail 22353 invoked by uid 65534); 15 Nov 2004 01:49:41 -0000 Original-Received: from unknown (EHLO localhost.localdomain) (195.50.12.120) by mail.gmx.net (mp016) with SMTP; 15 Nov 2004 02:49:41 +0100 X-Authenticated: #16844820 Original-To: "Lennart Borgman" User-Agent: KMail/1.4.3 In-Reply-To: <001001c4caa9$5105b9b0$0200a8c0@sedrcw11488> 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: main.gmane.org gmane.emacs.devel:29851 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:29851 > Though I found the behaviour suggested by Paul much more mnemonic when > bound to the Home key. It is also found in some other editors. > > - Lennart > > PS: Maybe I should write it as > > (defun home-or-back-to-indentation() > (interactive) > (if (bolp) (back-to-indentation) (beginning-of-line))) > > (define-key global-map [home] 'home-or-back-to-indentation) Perhaps, but this way you get it the way round: it will first jump to the beginning of line and then to the beginning of the text. Paul