emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 9278095: * test/automated/python-tests.el: Avoid wa


From: Juanma Barranquero
Subject: [Emacs-diffs] master 9278095: * test/automated/python-tests.el: Avoid warnings
Date: Sun, 01 Nov 2015 00:27:06 +0000

branch: master
commit 92780954424c7c2e815b2234cb0b23064119a172
Author: Juanma Barranquero <address@hidden>
Commit: Juanma Barranquero <address@hidden>

    * 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
    #
---
 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 44b05e2..f930ffb 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)



reply via email to

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