diff options
author | Jesús <heckyel@hyperbola.info> | 2018-08-09 18:44:13 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2018-08-09 18:44:13 -0500 |
commit | 46cc4b211ea4e3f249ba93dd862881db34910d95 (patch) | |
tree | a37c8bde1169a4c7f73438e6caa8aac10fd51cee /lisp/init-python.el | |
parent | 2a05b39f6a0c4d410ebc914b560db862c995d57b (diff) | |
download | emacs-personal-46cc4b211ea4e3f249ba93dd862881db34910d95.tar.lz emacs-personal-46cc4b211ea4e3f249ba93dd862881db34910d95.tar.xz emacs-personal-46cc4b211ea4e3f249ba93dd862881db34910d95.zip |
Can't guess python-indent-offset, using defaults 4
When you open a python file, emacs guesses the indentation offset (number of spaces to indent) based on that file style.
When you create a file (the case you describe), emacs cannot guess (file is empty) so it uses your default (4) and notifies the user.
In other words: tt is a harmless warning; if you find this is a bug please report it as such.
If you don't like emacs guessing the offset, customize the variable python-indent-guess-indent-offset to nil,
and then emacs will use always your default (very unsafe in python,
where indentation has meaning and you could be editing a file created by somebody else with other defaults).
Diffstat (limited to 'lisp/init-python.el')
-rw-r--r-- | lisp/init-python.el | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/init-python.el b/lisp/init-python.el index 6ed71df..eee16f7 100644 --- a/lisp/init-python.el +++ b/lisp/init-python.el @@ -4,6 +4,7 @@ (add-hook 'python-mode-hook (lambda () (setq indent-tabs-mode nil) + (setq python-indent-guess-indent-offset nil) (setq python-indent-offset 4))) (provide 'init-python) |