Avoid the error when computing top-level indentation.
* lisp/progmodes/python.el (python-indent-calculate-indentation): Do not apply max to an empty list
This commit is contained in:
parent
8e010cf6e7
commit
4188e3cc2b
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2015-02-04 Sam Steingold <sds@gnu.org>
|
||||||
|
|
||||||
|
* progmodes/python.el (python-indent-calculate-indentation): Avoid
|
||||||
|
the error when computing top-level indentation.
|
||||||
|
|
||||||
2015-02-04 Stefan Monnier <monnier@iro.umontreal.ca>
|
2015-02-04 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
* emacs-lisp/cl-generic.el (cl--generic-member-method): Fix paren typo.
|
* emacs-lisp/cl-generic.el (cl--generic-member-method): Fix paren typo.
|
||||||
|
|
|
@ -1068,7 +1068,9 @@ minimum."
|
||||||
(levels (python-indent--calculate-levels indentation)))
|
(levels (python-indent--calculate-levels indentation)))
|
||||||
(if previous
|
(if previous
|
||||||
(python-indent--previous-level levels (current-indentation))
|
(python-indent--previous-level levels (current-indentation))
|
||||||
(apply #'max levels))))
|
(if levels
|
||||||
|
(apply #'max levels)
|
||||||
|
0))))
|
||||||
|
|
||||||
(defun python-indent-line (&optional previous)
|
(defun python-indent-line (&optional previous)
|
||||||
"Internal implementation of `python-indent-line-function'.
|
"Internal implementation of `python-indent-line-function'.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue