diff options
author | Juanma Barranquero <lekktu@gmail.com> | 2015-11-01 01:17:16 +0100 |
---|---|---|
committer | Juanma Barranquero <lekktu@gmail.com> | 2015-11-01 01:17:16 +0100 |
commit | 92780954424c7c2e815b2234cb0b23064119a172 (patch) | |
tree | 7cd886ec370bbeae678e84a9227d6f5f2d1b8754 | |
parent | 312bbfee95cf24be6f8bae4de3864a2cce030e52 (diff) |
* test/automated/python-tests.el: Avoid warnings
(python-tests-with-temp-buffer, python-tests-with-temp-file):
Bind `python-indent-guess-indent-offset' to nil.
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Your branch is up-to-date with 'origin/master'.
#
# Changes to be committed:
# modified: test/automated/python-tests.el
#
-rw-r--r-- | test/automated/python-tests.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el index 44b05e2b47..f930ffba30 100644 --- a/test/automated/python-tests.el +++ b/test/automated/python-tests.el @@ -36,10 +36,11 @@ BODY is code to be executed within the temp buffer. Point is always located at the beginning of buffer." (declare (indent 1) (debug t)) `(with-temp-buffer - (python-mode) - (insert ,contents) - (goto-char (point-min)) - ,@body)) + (let ((python-indent-guess-indent-offset nil)) + (python-mode) + (insert ,contents) + (goto-char (point-min)) + ,@body))) (defmacro python-tests-with-temp-file (contents &rest body) "Create a `python-mode' enabled file with CONTENTS. @@ -48,7 +49,8 @@ always located at the beginning of buffer." (declare (indent 1) (debug t)) ;; temp-file never actually used for anything? `(let* ((temp-file (make-temp-file "python-tests" nil ".py")) - (buffer (find-file-noselect temp-file))) + (buffer (find-file-noselect temp-file)) + (python-indent-guess-indent-offset nil)) (unwind-protect (with-current-buffer buffer (python-mode) |