File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -489,6 +489,15 @@ Currently-active file is at the head of the list.")
489489 (mapcar #' (lambda (key )
490490 (define-key py-mode-map key 'py-newline-and-indent ))
491491 (where-is-internal 'newline-and-indent ))
492+ ; ; Force RET to be py-newline-and-indent even if it didn't get
493+ ; ; mapped by the above code. motivation: Emacs' default binding for
494+ ; ; RET is `newline' and C-j is `newline-and-indent' . Most Pythoneers
495+ ; ; expect RET to do a `py-newline-and-indent' and any Emacsers who
496+ ; ; dislike this are probably knowledgeable enough to do a rebind.
497+ ; ; However, we do *not* change C-j since many Emacsers have already
498+ ; ; swapped RET and C-j and they don't want C-j bound to `newline' to
499+ ; ; change.
500+ (define-key py-mode-map " \C -m" 'py-newline-and-indent )
492501 )
493502
494503(defvar py-mode-output-map nil
You can’t perform that action at this time.
0 commit comments