From: Glenn Morris Date: Tue, 26 Nov 2013 03:15:49 +0000 (-0500) Subject: * lisp/progmodes/python.el (python-indent-guess-indent-offset): X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~692 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0bf3f0fadfff621a25a7a7a260ab5c3d51b59716;p=emacs.git * lisp/progmodes/python.el (python-indent-guess-indent-offset): Avoid corner-case error. Fixes: debbugs:15975 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fd41ed84d64..4e6442f8952 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2013-11-26 Glenn Morris + * progmodes/python.el (python-indent-guess-indent-offset): + Avoid corner-case error. (Bug#15975) + Preload leim-list.el. (Bug#4789) * loadup.el: Load leim-list.el when found. * startup.el (normal-top-level): Skip re-loading leim/leim-list.el. diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 8dc345ca1c1..458f0f16fb6 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -676,7 +676,7 @@ AFTER-LINE.") (goto-char block-end) (python-util-forward-comment) (current-indentation)))) - (if indentation + (if (and indentation (not (zerop indentation))) (set (make-local-variable 'python-indent-offset) indentation) (message "Can't guess python-indent-offset, using defaults: %s" python-indent-offset)))))))