From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Lennart Borgman" Newsgroups: gmane.emacs.devel Subject: Re: a simple convenience function Date: Mon, 15 Nov 2004 08:28:12 +0100 Message-ID: <002501c4cae5$5bec2260$0200a8c0@sedrcw11488> References: <200411142336.00131.pogonyshev@gmx.net> <20041114233449.GC12968@fencepost> <001001c4caa9$5105b9b0$0200a8c0@sedrcw11488> <200411150349.57864.pogonyshev@gmx.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1100504027 9649 80.91.229.6 (15 Nov 2004 07:33:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 15 Nov 2004 07:33:47 +0000 (UTC) Cc: emacs-devel@gnu.org, Drew Adams , Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 15 08:33:34 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 1CTbMk-0005mg-00 for ; Mon, 15 Nov 2004 08:33:34 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CTbVQ-0003km-T6 for ged-emacs-devel@m.gmane.org; Mon, 15 Nov 2004 02:42:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CTbVK-0003kX-Rf for emacs-devel@gnu.org; Mon, 15 Nov 2004 02:42:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CTbVK-0003kL-Fm for emacs-devel@gnu.org; Mon, 15 Nov 2004 02:42:26 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CTbVK-0003kI-D6 for emacs-devel@gnu.org; Mon, 15 Nov 2004 02:42:26 -0500 Original-Received: from [81.228.11.107] (helo=av1-1-sn1.fre.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CTbMJ-00027r-TS; Mon, 15 Nov 2004 02:33:08 -0500 Original-Received: by av1-1-sn1.fre.skanova.net (Postfix, from userid 502) id B7FE137E9B; Mon, 15 Nov 2004 08:33:06 +0100 (CET) Original-Received: from smtp3-2-sn1.fre.skanova.net (smtp3-2-sn1.fre.skanova.net [81.228.11.164]) by av1-1-sn1.fre.skanova.net (Postfix) with ESMTP id A90CB37E5B; Mon, 15 Nov 2004 08:33:06 +0100 (CET) Original-Received: from sedrcw11488 (t3o58p23.telia.com [195.252.56.23]) by smtp3-2-sn1.fre.skanova.net (Postfix) with SMTP id A7E9437E51; Mon, 15 Nov 2004 08:33:04 +0100 (CET) Original-To: "Paul Pogonyshev" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 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:29861 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:29861 Yes, my intention was to not change the default behaviour for default usage so to say, but I realize now that a little bit more is needed to achieve that. - Lennart ----- Original Message ----- From: "Paul Pogonyshev" To: "Lennart Borgman" Cc: "Miles Bader" ; Sent: Monday, November 15, 2004 2:49 AM Subject: Re: a simple convenience function > 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