[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bind RET to command
From: |
Tassilo Horn |
Subject: |
Re: Bind RET to command |
Date: |
Thu, 21 Feb 2008 12:31:21 +0100 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) |
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)
- Bind RET to command, Florian Lindner, 2008/02/21
- Re: Bind RET to command,
Tassilo Horn <=
- Re: Bind RET to command, Michael Hoffman, 2008/02/21
- Message not available
- Re: Bind RET to command, Ralf Angeli, 2008/02/22
- use-file-dialog, address@hidden, 2008/02/22
- Re: use-file-dialog, Bastien, 2008/02/22
- Re: use-file-dialog, Lennart Borgman (gmail), 2008/02/22
- Re: use-file-dialog, Bastien Guerry, 2008/02/22
- Re: use-file-dialog, Lennart Borgman (gmail), 2008/02/22
- Re: use-file-dialog, Reiner Steib, 2008/02/23
- Re: use-file-dialog, Kevin Rodgers, 2008/02/24