emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r115239: * lisp/progmodes/python.el (python-indent-g


From: Glenn Morris
Subject: [Emacs-diffs] trunk r115239: * lisp/progmodes/python.el (python-indent-guess-indent-offset):
Date: Tue, 26 Nov 2013 03:15:53 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115239
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/15975
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Mon 2013-11-25 22:15:49 -0500
message:
  * lisp/progmodes/python.el (python-indent-guess-indent-offset):
  Avoid corner-case error.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/progmodes/python.el       python.el-20091113204419-o5vbwnq5f7feedwu-3008
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-11-26 01:06:23 +0000
+++ b/lisp/ChangeLog    2013-11-26 03:15:49 +0000
@@ -1,5 +1,8 @@
 2013-11-26  Glenn Morris  <address@hidden>
 
+       * 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.

=== modified file 'lisp/progmodes/python.el'
--- a/lisp/progmodes/python.el  2013-11-23 19:39:50 +0000
+++ b/lisp/progmodes/python.el  2013-11-26 03:15:49 +0000
@@ -676,7 +676,7 @@
                  (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)))))))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]