From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bernardo Newsgroups: gmane.emacs.help Subject: Re: enter key behaviour Date: Mon, 15 Jun 2009 17:36:48 +1000 Message-ID: <4A35FA10.7000406@pobox.com> References: <20090612133824.51238d57@gom> <4A349465.7090509@pobox.com> <4A3495C9.2080402@pobox.com> <20090614004324.1bea22a8@gom> Reply-To: bernardo.bacic@pobox.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1245051534 26670 80.91.229.12 (15 Jun 2009 07:38:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Jun 2009 07:38:54 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 15 09:38:51 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MG6mG-0004fp-4i for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jun 2009 09:38:48 +0200 Original-Received: from localhost ([127.0.0.1]:33375 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MG6mF-0005cP-DH for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jun 2009 03:38:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MG6ls-0005cG-1q for help-gnu-emacs@gnu.org; Mon, 15 Jun 2009 03:38:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MG6ln-0005be-IE for help-gnu-emacs@gnu.org; Mon, 15 Jun 2009 03:38:23 -0400 Original-Received: from [199.232.76.173] (port=44680 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MG6ln-0005bb-Bs for help-gnu-emacs@gnu.org; Mon, 15 Jun 2009 03:38:19 -0400 Original-Received: from a-sasl-fastnet.sasl.smtp.pobox.com ([207.106.133.19]:60246 helo=sasl.smtp.pobox.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MG6ln-0001TU-1a for help-gnu-emacs@gnu.org; Mon, 15 Jun 2009 03:38:19 -0400 Original-Received: from localhost.localdomain (unknown [127.0.0.1]) by a-sasl-fastnet.sasl.smtp.pobox.com (Postfix) with ESMTP id 779CABB3DB for ; Mon, 15 Jun 2009 03:38:18 -0400 (EDT) Original-Received: from [192.168.1.10] (unknown [220.233.188.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-sasl-fastnet.sasl.smtp.pobox.com (Postfix) with ESMTPSA id C8427BB3DA for ; Mon, 15 Jun 2009 03:38:17 -0400 (EDT) User-Agent: Thunderbird 2.0.0.21 (X11/20090302) In-Reply-To: <20090614004324.1bea22a8@gom> X-Pobox-Relay-ID: 7E6E6432-597F-11DE-BE83-97731A10BFE7-14340206!a-sasl-fastnet.pobox.com X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) 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: news.gmane.org gmane.emacs.help:65293 Archived-At: prad said the following on 14/06/09 17:43: > On Sun, 14 Jun 2009 16:16:41 +1000 >> > so i just commented out this line > (define-key py-mode-map "\C-m" 'py-newline-and-indent) > in the python-mode.el file to get the desired behavior. > there's nothing from stopping you do it that way, but if you share your PC with other users, or if you don't want your changes to be clobbered when you upgrade GNU Emacs/python-mode it may be better to put customisations into your init (.emacs) file probably something along the lines (not tested): (add-hook 'python-mode-hook (lambda () (define-key py-mode-map "\C-m" 'newline))) ; or the function you want also, as an alternative to "\C-m" have a look at the kbd macro (kbd "C-m") C-h f kbd RET