summaryrefslogtreecommitdiff
path: root/Misc/python-mode.el
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1998-01-21 05:14:24 +0000
committerBarry Warsaw <barry@python.org>1998-01-21 05:14:24 +0000
commit97bb98889bbb1bcbc18135abbd1f9267c278bad6 (patch)
tree336da28ae6cf1985db63d7833d7f3e6b84d032d0 /Misc/python-mode.el
parentde3a83435e748cdb5bdca573c6601f5b87f70077 (diff)
downloadcpython-97bb98889bbb1bcbc18135abbd1f9267c278bad6.tar.gz
(py-mode-map): Add a binding of C-m to py-newline-and-indent. This is
a religious issue: RMS decrees that the Enter (RET) key should just do a newline and a LFD (C-j) should do a newline and indent (i.e. the python-mode version of this). Almost everyone I know disagrees and finds that RET should do newline and indent. Almost everyone hacks their modes to do this, if they know how. Because it's hard for newbies to figure out how to do this, and because most DOS keyboards lack a LFD (leaving users to the more obscure C-j), I think it makes better sense to add this default binding.
Diffstat (limited to 'Misc/python-mode.el')
-rw-r--r--Misc/python-mode.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/Misc/python-mode.el b/Misc/python-mode.el
index a209f5bf4c..ec9e09e1da 100644
--- a/Misc/python-mode.el
+++ b/Misc/python-mode.el
@@ -550,7 +550,8 @@ Currently-active file is at the head of the list.")
(define-key py-mode-map "\C-c\C-b" 'py-submit-bug-report)
(define-key py-mode-map "\C-c\C-v" 'py-version)
;; py-newline-and-indent mappings
- (define-key py-mode-map "\n" 'py-newline-and-indent)
+ (define-key py-mode-map "\n" 'py-newline-and-indent)
+ (define-key py-mode-map "\C-m" 'py-newline-and-indent)
;; shadow global bindings for newline-and-indent w/ the py- version.
;; BAW - this is extremely bad form, but I'm not going to change it
;; for now.