An Emacs mode for editing Python code

How to look up and change TAB width

Asked by James Jong on 2013-03-26

Q1: How does python-mode figure out the TAB width from a file with python code when I open it?

Q2: Is this width stored in a variable? How can I specify (and enforce) a TAB width throughout a document? (i.e. in spaces).

Question information

Language:
English Edit question
Status:
Answered
For:
python-mode.el Edit question
Assignee:
No assignee Edit question
Last query:
2013-03-26
Last reply:
2013-03-26
Andreas Roehler (a-roehler) said : #1

Am 26.03.2013 20:21, schrieb James Jong:
> Question #225222 on python-mode.el changed:
> https://answers.launchpad.net/python-mode/+question/225222
>
> Description changed to:
> Q1: How does python-mode figure out the TAB width from a file with
> python code when I open it?
>

See variables py-indent-offset, py-indent-tabs-mode, py-smart-indentation

> Q2: Is this width stored in a variable? How can I specify (and enforce)
> a TAB width throughout a document? (i.e. in spaces).
>

by customizing py-indent-offset resp. py-indent-tabs-mode

Can you help with this problem?

Provide an answer of your own, or ask James Jong for more information if necessary.

To post a message you must log in.