From: Tassilo Horn <tassilo@member.fsf.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Bind RET to command
Date: Thu, 21 Feb 2008 12:31:21 +0100 [thread overview]
Message-ID: <87ve4i7dh2.fsf@member.fsf.org> (raw)
In-Reply-To: nemoThu022108111759@news.lrz-muenchen.de
Florian Lindner <Florian.Lindner@xgm.de> writes:
Hi Florian,
> 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)))
(add-hook 'python-mode-hook
(lambda ()
(local-set-key (kbd "RET") 'newline-and-indent)))
(Or add the local-set-key expression to a function you already add to
those hooks.)
Bye,
Tassilo
--
People sometimes ask me if it is a sin in the Church of Emacs to use
vi. Using a free version of vi is not a sin; it is a penance. So happy
hacking. (Richard M. Stallman)
next prev parent reply other threads:[~2008-02-21 11:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-21 10:21 Bind RET to command Florian Lindner
2008-02-21 11:31 ` Tassilo Horn [this message]
2008-02-21 11:32 ` Michael Hoffman
[not found] ` <mailman.7735.1203593497.18990.help-gnu-emacs@gnu.org>
2008-02-22 17:55 ` Ralf Angeli
2008-02-22 23:54 ` use-file-dialog admin
2008-02-23 1:06 ` use-file-dialog Bastien
2008-02-23 0:11 ` use-file-dialog Lennart Borgman (gmail)
2008-02-23 1:44 ` use-file-dialog Bastien Guerry
2008-02-23 0:59 ` use-file-dialog Lennart Borgman (gmail)
2008-02-23 16:43 ` use-file-dialog Reiner Steib
2008-02-24 15:24 ` use-file-dialog Kevin Rodgers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ve4i7dh2.fsf@member.fsf.org \
--to=tassilo@member.fsf.org \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).