diff options
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 5532d5f6ce1..812e28268c2 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -233,23 +233,6 @@ | |||
| 233 | ;; `python-imenu-format-parent-item-jump-label-function' variables for | 233 | ;; `python-imenu-format-parent-item-jump-label-function' variables for |
| 234 | ;; changing the way labels are formatted in the tree version. | 234 | ;; changing the way labels are formatted in the tree version. |
| 235 | 235 | ||
| 236 | ;; If you used python-mode.el you may miss auto-indentation when | ||
| 237 | ;; inserting newlines. To achieve the same behavior you have two | ||
| 238 | ;; options: | ||
| 239 | |||
| 240 | ;; 1) Enable the minor-mode `electric-indent-mode' (enabled by | ||
| 241 | ;; default) and use RET. If this mode is disabled use | ||
| 242 | ;; `newline-and-indent', bound to C-j. | ||
| 243 | |||
| 244 | ;; 2) Add the following hook in your .emacs: | ||
| 245 | |||
| 246 | ;; (add-hook 'python-mode-hook | ||
| 247 | ;; (lambda () | ||
| 248 | ;; (define-key python-mode-map "\C-m" 'newline-and-indent))) | ||
| 249 | |||
| 250 | ;; I'd recommend the first one since you'll get the same behavior for | ||
| 251 | ;; all modes out-of-the-box. | ||
| 252 | |||
| 253 | ;; Flymake: A Flymake backend, using the pyflakes program by default, | 236 | ;; Flymake: A Flymake backend, using the pyflakes program by default, |
| 254 | ;; is provided. You can also use flake8 or pylint by customizing | 237 | ;; is provided. You can also use flake8 or pylint by customizing |
| 255 | ;; `python-flymake-command'. | 238 | ;; `python-flymake-command'. |
| @@ -440,7 +423,7 @@ To customize the Python interpreter for interactive use, modify | |||
| 440 | :help "Toggle subword movement and editing mode"]))) | 423 | :help "Toggle subword movement and editing mode"]))) |
| 441 | 424 | ||
| 442 | (defvar python-ts-mode-map (copy-keymap python-mode-map) | 425 | (defvar python-ts-mode-map (copy-keymap python-mode-map) |
| 443 | "Keymap for `(copy-keymap python-mode-map)'.") | 426 | "Keymap for `python-ts-mode'.") |
| 444 | 427 | ||
| 445 | 428 | ||
| 446 | ;;; Python specialized rx | 429 | ;;; Python specialized rx |