Я использую emacs 23.1.1 в Ubuntu 10.04. Я хочу программировать на Python с отступом в два пробела. Кажется, что в emacs есть режим по умолчанию для python (python.el?).
Я помещаю в свой .emacs следующее:
;; Only spaces, no tabs
(setq indent-tabs-mode nil)
;; Always end a file with a newline
(setq require-final-newline nil)
;; Don't know which of these might work
(setq-default tab-width 2)
(setq-default python-indent 2)
(setq-default py-indent-offset 2)
Когда я редактирую файл Python, он использует отступ из 4 пробелов. Когда я пробую Ch v python-indent, он говорит:
python-indent's value is 4
Local in buffer webpage_cache.py; global value is 2
This variable is safe as a file local variable if its value
satisfies the predicate `integerp'.
Documentation:
Number of columns for a unit of indentation in Python mode.
See also `M-x python-guess-indent'
You can customize this variable.
То есть это 4, а не 2. Grr. Я попытался настроить переменную и сохранить, но все же 4. Я попробовал настроить отступ для группы, все еще 4.
Как мне заставить emacs обратить внимание?