From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ralf Angeli Newsgroups: gmane.emacs.help Subject: Re: Bind RET to command Date: Fri, 22 Feb 2008 18:55:23 +0100 Organization: nil Message-ID: <47bf0c8b$0$2301$9b4e6d93@newsspool4.arcor-online.net> References: Reply-To: angeli@caeruleus.net NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1203705703 27130 80.91.229.12 (22 Feb 2008 18:41:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Feb 2008 18:41:43 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Feb 22 19:42:04 2008 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 1JScqK-0002Sq-5D for geh-help-gnu-emacs@m.gmane.org; Fri, 22 Feb 2008 19:41:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JScpo-0007nf-U6 for geh-help-gnu-emacs@m.gmane.org; Fri, 22 Feb 2008 13:41:24 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news-fra1.dfn.de!newsfeed.ision.net!newsfeed2.easynews.net!ision!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Mail-Copies-To: nobody Cancel-Lock: sha1:FDwYaBT0JnIToVBw24ICf0g2Czo= Original-Lines: 18 Original-NNTP-Posting-Date: 22 Feb 2008 18:55:23 CET Original-NNTP-Posting-Host: 10bb35ca.newsspool4.arcor-online.net Original-X-Trace: DXC=>m2:ijEjGjc]BlmkiiU@Bi4IUK\BH3YbiANGlZk; R:gB_Neh; dBi?k=@OCEHFFOLdchR=@80WR\d>9=nMG 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:51770 Archived-At: * Tassilo Horn (2008-02-21) writes: > Florian Lindner writes: > >> How can I bind this to return but only in LaTeX mode (Auctex) and >> python-mode. > > One way to do it is that: > > (add-hook 'LaTeX-mode-hook > (lambda () > (local-set-key (kbd "RET") 'newline-and-indent))) There is a much easier way. Just do M-x customize-variable TeX-newline-function -- Ralf