From: Juanma Barranquero Date: Sun, 1 Nov 2015 00:17:16 +0000 (+0100) Subject: * test/automated/python-tests.el: Avoid warnings X-Git-Tag: emacs-25.0.90~946 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=92780954424c7c2e815b2234cb0b23064119a172;p=emacs.git * 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 # --- diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el index 44b05e2b476..f930ffba302 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)