Add prelude-python-mode-set-encoding-automatically defcustom ()

- if it is nil (default) does nothing
- if non-nil insert '# coding: utf-8' on top of python buffers
This commit is contained in:
Manoel Vilela 2020-10-07 04:21:20 -03:00 committed by GitHub
parent 041617e8b0
commit 7226716739
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 1 deletions
doc/modules

View file

@ -20,3 +20,16 @@ syntax checkers, [Pylint](http://www.pylint.org/) and
order to have Flycheck support on the fly syntax checking for
Python you need to have either of these installed and accessible to
Emacs. In order to manually choose a checker run `C-c ! s`.
## Automatic insertion of # coding: utf-8
Previously `prelude-python` had this feature enabled by default, but
that is only necessary on Python2, because Python3 already use utf-8
as default encoding. In 2020, python2 becames deprecated, so that
functionallity becames a annoying side-effect for some users. If you
wish to enable this, add this to your config file:
```emacs-lisp
(setq prelude-python-mode-set-encoding-automatically t)
```