1. 24 Nov, 2015 1 commit
    • Phillip Lord's avatar
      Rename all test files to reflect source layout. · 22bbf7ca
      Phillip Lord authored
       * CONTRIBUTE,Makefile.in,configure.ac: Update to reflect
         test directory moves.
       * test/file-organisation.org: New file.
       * test/automated/Makefile.in
         test/automated/data/decompress/foo.gz
         test/automated/data/epg/pubkey.asc
         test/automated/data/epg/seckey.asc
         test/automated/data/files-bug18141.el.gz
         test/automated/data/flymake/test.c
         test/automated/data/flymake/test.pl
         test/automated/data/package/archive-contents
         test/automated/data/package/key.pub
         test/automated/data/package/key.sec
         test/automated/data/package/multi-file-0.2.3.tar
         test/automated/data/package/multi-file-readme.txt
         test/automated/data/package/newer-versions/archive-contents
         test/automated/data/package/newer-versions/new-pkg-1.0.el
         test/automated/data/package/newer-versions/simple-single-1.4.el
         test/automated/data/package/package-test-server.py
         test/automated/data/package/signed/archive-contents
         test/automated/data/package/signed/archive-contents.sig
         test/automated/data/package/signed/signed-bad-1.0.el
         test/automated/data/package/signed/signed-bad-1.0.el.sig
         test/automated/data/package/signed/signed-good-1.0.el
         test/automated/data/package/signed/signed-good-1.0.el.sig
         test/automated/data/package/simple-depend-1.0.el
         test/automated/data/package/simple-single-1.3.el
         test/automated/data/package/simple-single-readme.txt
         test/automated/data/package/simple-two-depend-1.1.el
         test/automated/abbrev-tests.el
         test/automated/auto-revert-tests.el
         test/automated/calc-tests.el
         test/automated/icalendar-tests.el
         test/automated/character-fold-tests.el
         test/automated/comint-testsuite.el
         test/automated/descr-text-test.el
         test/automated/electric-tests.el
         test/automated/cl-generic-tests.el
         test/automated/cl-lib-tests.el
         test/automated/eieio-test-methodinvoke.el
         test/automated/eieio-test-persist.el
         test/automated/eieio-tests.el
         test/automated/ert-tests.el
         test/automated/ert-x-tests.el
         test/automated/generator-tests.el
         test/automated/let-alist.el
         test/automated/map-tests.el
         test/automated/advice-tests.el
         test/automated/package-test.el
         test/automated/pcase-tests.el
         test/automated/regexp-tests.el
         test/automated/seq-tests.el
         test/automated/subr-x-tests.el
         test/automated/tabulated-list-test.el
         test/automated/thunk-tests.el
         test/automated/timer-tests.el
         test/automated/epg-tests.el
         test/automated/eshell.el
         test/automated/faces-tests.el
         test/automated/file-notify-tests.el
         test/automated/auth-source-tests.el
         test/automated/gnus-tests.el
         test/automated/message-mode-tests.el
         test/automated/help-fns.el
         test/automated/imenu-test.el
         test/automated/info-xref.el
         test/automated/mule-util.el
         test/automated/isearch-tests.el
         test/automated/json-tests.el
         test/automated/bytecomp-tests.el
         test/automated/coding-tests.el
         test/automated/core-elisp-tests.el
         test/automated/decoder-tests.el
         test/automated/files.el
         test/automated/font-parse-tests.el
         test/automated/lexbind-tests.el
         test/automated/occur-tests.el
         test/automated/process-tests.el
         test/automated/syntax-tests.el
         test/automated/textprop-tests.el
         test/automated/undo-tests.el
         test/automated/man-tests.el
         test/automated/completion-tests.el
         test/automated/dbus-tests.el
         test/automated/newsticker-tests.el
         test/automated/sasl-scram-rfc-tests.el
         test/automated/tramp-tests.el
         test/automated/obarray-tests.el
         test/automated/compile-tests.el
         test/automated/elisp-mode-tests.el
         test/automated/f90.el
         test/automated/flymake-tests.el
         test/automated/python-tests.el
         test/automated/ruby-mode-tests.el
         test/automated/subword-tests.el
         test/automated/replace-tests.el
         test/automated/simple-test.el
         test/automated/sort-tests.el
         test/automated/subr-tests.el
         test/automated/reftex-tests.el
         test/automated/sgml-mode-tests.el
         test/automated/tildify-tests.el
         test/automated/thingatpt.el
         test/automated/url-future-tests.el
         test/automated/url-util-tests.el
         test/automated/add-log-tests.el
         test/automated/vc-bzr.el
         test/automated/vc-tests.el
         test/automated/xml-parse-tests.el
         test/BidiCharacterTest.txt
         test/biditest.el
         test/cedet/cedet-utests.el
         test/cedet/ede-tests.el
         test/cedet/semantic-ia-utest.el
         test/cedet/semantic-tests.el
         test/cedet/semantic-utest-c.el
         test/cedet/semantic-utest.el
         test/cedet/srecode-tests.el
         test/cedet/tests/test.c
         test/cedet/tests/test.el
         test/cedet/tests/test.make
         test/cedet/tests/testdoublens.cpp
         test/cedet/tests/testdoublens.hpp
         test/cedet/tests/testfriends.cpp
         test/cedet/tests/testjavacomp.java
         test/cedet/tests/testnsp.cpp
         test/cedet/tests/testpolymorph.cpp
         test/cedet/tests/testspp.c
         test/cedet/tests/testsppcomplete.c
         test/cedet/tests/testsppreplace.c
         test/cedet/tests/testsppreplaced.c
         test/cedet/tests/testsubclass.cpp
         test/cedet/tests/testsubclass.hh
         test/cedet/tests/testtypedefs.cpp
         test/cedet/tests/testvarnames.c
         test/etags/CTAGS.good
         test/etags/ETAGS.good_1
         test/etags/ETAGS.good_2
         test/etags/ETAGS.good_3
         test/etags/ETAGS.good_4
         test/etags/ETAGS.good_5
         test/etags/ETAGS.good_6
         test/etags/a-src/empty.zz
         test/etags/a-src/empty.zz.gz
         test/etags/ada-src/2ataspri.adb
         test/etags/ada-src/2ataspri.ads
         test/etags/ada-src/etags-test-for.ada
         test/etags/ada-src/waroquiers.ada
         test/etags/c-src/a/b/b.c
         test/etags/c-src/abbrev.c
         test/etags/c-src/c.c
         test/etags/c-src/dostorture.c
         test/etags/c-src/emacs/src/gmalloc.c
         test/etags/c-src/emacs/src/keyboard.c
         test/etags/c-src/emacs/src/lisp.h
         test/etags/c-src/emacs/src/regex.h
         test/etags/c-src/etags.c
         test/etags/c-src/exit.c
         test/etags/c-src/exit.strange_suffix
         test/etags/c-src/fail.c
         test/etags/c-src/getopt.h
         test/etags/c-src/h.h
         test/etags/c-src/machsyscalls.c
         test/etags/c-src/machsyscalls.h
         test/etags/c-src/sysdep.h
         test/etags/c-src/tab.c
         test/etags/c-src/torture.c
         test/etags/cp-src/MDiagArray2.h
         test/etags/cp-src/Range.h
         test/etags/cp-src/burton.cpp
         test/etags/cp-src/c.C
         test/etags/cp-src/clheir.cpp.gz
         test/etags/cp-src/clheir.hpp
         test/etags/cp-src/conway.cpp
         test/etags/cp-src/conway.hpp
         test/etags/cp-src/fail.C
         test/etags/cp-src/functions.cpp
         test/etags/cp-src/screen.cpp
         test/etags/cp-src/screen.hpp
         test/etags/cp-src/x.cc
         test/etags/el-src/TAGTEST.EL
         test/etags/el-src/emacs/lisp/progmodes/etags.el
         test/etags/erl-src/gs_dialog.erl
         test/etags/f-src/entry.for
         test/etags/f-src/entry.strange.gz
         test/etags/f-src/entry.strange_suffix
         test/etags/forth-src/test-forth.fth
         test/etags/html-src/algrthms.html
         test/etags/html-src/index.shtml
         test/etags/html-src/software.html
         test/etags/html-src/softwarelibero.html
         test/etags/lua-src/allegro.lua
         test/etags/objc-src/PackInsp.h
         test/etags/objc-src/PackInsp.m
         test/etags/objc-src/Subprocess.h
         test/etags/objc-src/Subprocess.m
         test/etags/objcpp-src/SimpleCalc.H
         test/etags/objcpp-src/SimpleCalc.M
         test/etags/pas-src/common.pas
         test/etags/perl-src/htlmify-cystic
         test/etags/perl-src/kai-test.pl
         test/etags/perl-src/yagrip.pl
         test/etags/php-src/lce_functions.php
         test/etags/php-src/ptest.php
         test/etags/php-src/sendmail.php
         test/etags/prol-src/natded.prolog
         test/etags/prol-src/ordsets.prolog
         test/etags/ps-src/rfc1245.ps
         test/etags/pyt-src/server.py
         test/etags/tex-src/gzip.texi
         test/etags/tex-src/nonewline.tex
         test/etags/tex-src/testenv.tex
         test/etags/tex-src/texinfo.tex
         test/etags/y-src/atest.y
         test/etags/y-src/cccp.c
         test/etags/y-src/cccp.y
         test/etags/y-src/parse.c
         test/etags/y-src/parse.y
         test/indent/css-mode.css
         test/indent/js-indent-init-dynamic.js
         test/indent/js-indent-init-t.js
         test/indent/js-jsx.js
         test/indent/js.js
         test/indent/latex-mode.tex
         test/indent/modula2.mod
         test/indent/nxml.xml
         test/indent/octave.m
         test/indent/pascal.pas
         test/indent/perl.perl
         test/indent/prolog.prolog
         test/indent/ps-mode.ps
         test/indent/ruby.rb
         test/indent/scheme.scm
         test/indent/scss-mode.scss
         test/indent/sgml-mode-attribute.html
         test/indent/shell.rc
         test/indent/shell.sh
         test/redisplay-testsuite.el
         test/rmailmm.el
         test/automated/buffer-tests.el
         test/automated/cmds-tests.el
         test/automated/data-tests.el
         test/automated/finalizer-tests.el
         test/automated/fns-tests.el
         test/automated/inotify-test.el
         test/automated/keymap-tests.el
         test/automated/print-tests.el
         test/automated/libxml-tests.el
         test/automated/zlib-tests.el: Files Moved.
      22bbf7ca
  2. 01 Nov, 2015 2 commits
    • Juanma Barranquero's avatar
      Fix bug#21762 · 590a820f
      Juanma Barranquero authored
      * lisp/progmodes/python.el (python-syntax-closing-paren-p): Check with
      `eql' instead of `=' to accommodate the case that (syntax-after (point))
      returns nil.
      
      * test/automated/python-tests.el (python-indent-inside-paren-7):
      New test.
      590a820f
    • Juanma Barranquero's avatar
      * test/automated/python-tests.el: Avoid warnings · 92780954
      Juanma Barranquero authored
      (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
      #
      92780954
  3. 28 Sep, 2015 1 commit
  4. 04 Sep, 2015 1 commit
    • Paul Eggert's avatar
      Support automated ‘make check’ in non-C locale · 4874f0bb
      Paul Eggert authored
      This lets the builder optionally test Emacs behavior in other locales.
      The C locale is still the default for tests.
      * test/automated/Makefile.in (TEST_LOCALE): New macro.
      (emacs): Use it.
      * test/automated/flymake-tests.el (flymake-tests--current-face):
      Use C locale for subprocesses so that tests behave as expected.
      * test/automated/python-tests.el:
      (python-shell-prompt-validate-regexps-1)
      (python-shell-prompt-validate-regexps-2)
      (python-shell-prompt-validate-regexps-3)
      (python-shell-prompt-validate-regexps-4)
      (python-shell-prompt-validate-regexps-5)
      (python-shell-prompt-validate-regexps-6)
      (python-shell-prompt-set-calculated-regexps-1):
      Adjust expected output to match locale.
      * test/automated/tildify-tests.el (tildify-test--test)
      (tildify-space-test--test, tildify-space-undo-test--test):
      This test assumes UTF-8 encoding.
      4874f0bb
  5. 29 Aug, 2015 1 commit
    • Eli Zaretskii's avatar
      Fix Python tests on MS-Windows · 57e12057
      Eli Zaretskii authored
      * test/automated/python-tests.el
      (python-shell-calculate-command-1): Run python-shell-interpreter
      through shell-quote-argument before comparing with what
      python-shell-calculate-command returns.
      (python-shell-calculate-pythonpath-1)
      (python-shell-calculate-pythonpath-2)
      (python-shell-calculate-process-environment-2): Use path-separator
      instead of a literal ':'.
      (python-shell-calculate-exec-path-2)
      (python-shell-calculate-exec-path-3)
      (python-shell-calculate-exec-path-4)
      (python-shell-with-environment-1)
      (python-shell-with-environment-2): Run "/env/bin" through
      expand-file-name before comparing with exec-path.  (Bug#21375)
      57e12057
  6. 23 Aug, 2015 1 commit
  7. 22 Aug, 2015 1 commit
  8. 21 Aug, 2015 1 commit
    • Fabián Ezequiel Gallina's avatar
      python.el: Enhancements to process environment setup. · 4150b563
      Fabián Ezequiel Gallina authored
      * lisp/progmodes/python.el (python-shell-process-environment)
      (python-shell-extra-pythonpaths, python-shell-exec-path)
      (python-shell-virtualenv-root): Update docstring.  Remove :safe.
      (python-shell-setup-codes): Remove :safe.
      (python-shell-remote-exec-path): New defcustom.
      (python-shell--add-to-path-with-priority): New macro.
      (python-shell-calculate-pythonpath): Give priority to
      python-shell-extra-pythonpaths.  Update docstring.
      (python-shell-calculate-process-environment): Give priority to
      python-shell-process-environment.  Update docstring.
      (python-shell-calculate-exec-path): Give priority to
      python-shell-exec-path and calculated virtualenv bin directory.
      Update docstring.
      (python-shell-tramp-refresh-remote-path): New function.
      (python-shell-with-environment): Use it when working remotely and
      do not modify tramp-remote-path.  Allow nesting.
      (python-shell-calculate-command): Remove useless
      python-shell-with-environment call.
      
      * test/automated/python-tests.el (python-shell-calculate-pythonpath-1)
      (python-shell-calculate-pythonpath-2)
      (python-shell-calculate-process-environment-6)
      (python-shell-calculate-process-environment-7)
      (python-shell-calculate-process-environment-8)
      (python-shell-calculate-exec-path-3)
      (python-shell-calculate-exec-path-4)
      (python-shell-calculate-exec-path-5)
      (python-shell-calculate-exec-path-6)
      (python-shell-with-environment-3): New tests.
      (python-shell-calculate-process-environment-2)
      (python-shell-calculate-process-environment-3)
      (python-shell-calculate-process-environment-4)
      (python-shell-calculate-process-environment-5)
      (python-shell-calculate-exec-path-1)
      (python-shell-calculate-exec-path-2)
      (python-shell-with-environment-1)
      (python-shell-with-environment-2): Update and simplify.
      4150b563
  9. 06 Jul, 2015 2 commits
  10. 05 Jul, 2015 1 commit
    • Christoph Wedler's avatar
      Respect `prog-indentation-context' in python.el · 044d4cc0
      Christoph Wedler authored
      * lisp/progmodes/python.el (python-indent-guess-indent-offset)
      (python-indent-context, python-indent--calculate-indentation)
      (python-info-current-defun)
      (python-info-dedenter-opening-block-message)
      (python-info-line-ends-backslash-p)
      (python-info-beginning-of-backslash)
      (python-info-continuation-line-p): Use `prog-widen'.
      (python-indent--calculate-indentation)
      (python-indent--calculate-levels)
      (python-indent-calculate-indentation): Use `prog-first-column'.
      (python-indent--calculate-levels): Simplify.
      
      Ignore also initial empty lines for syntax calculation.
      * lisp/progmodes/python.el (python-indent-context): Return
      :no-indent for first non-empty line, not just in line 1.
      * test/automated/python-tests.el (python-indent-base-case)
      (python-indent-inside-paren-1, python-indent-inside-paren-2)
      (python-indent-inside-paren-3, python-indent-inside-paren-4)
      (python-indent-inside-paren-5, python-indent-inside-paren-6)
      (python-indent-after-backslash-1)
      (python-indent-after-backslash-2)
      (python-indent-after-backslash-3)
      (python-indent-after-backslash-4, python-indent-inside-string-1):
      Expect :no-indent for first non-empty line.
      044d4cc0
  11. 13 Apr, 2015 1 commit
    • Fabián Ezequiel Gallina's avatar
      python.el: Keep symmetry on sexp navigation with parens · 659609d1
      Fabián Ezequiel Gallina authored
      Fixes: debbugs:19954
      
      * lisp/progmodes/python.el
      (python-nav--forward-sexp): Add argument skip-parens-p.
      (python-nav-forward-sexp, python-nav-backward-sexp)
      (python-nav-forward-sexp-safe)
      (python-nav-backward-sexp-safe): Use it.
      
      * test/automated/python-tests.el
      (python-nav-forward-sexp-1): Fix test.
      659609d1
  12. 09 Apr, 2015 1 commit
    • Fabián Ezequiel Gallina's avatar
      python.el: Indent docstring lines to base-indent · c9415ccb
      Fabián Ezequiel Gallina authored
      Fixes: debbugs:19595
      
      Thanks to immerrr <immerrr@gmail.com> for reporting and providing
      an initial patch.
      
      * lisp/progmodes/python.el
      (python-indent-context): Add :inside-docstring context.
      (python-indent--calculate-indentation): Handle :inside-docstring.
      (python-indent-region): Re-indent docstrings.
      
      * test/automated/python-tests.el (python-indent-region-5)
      (python-indent-inside-string-2): Fix tests.
      c9415ccb
  13. 06 Apr, 2015 1 commit
    • Fabián Ezequiel Gallina's avatar
      python.el: Enhance docstring detection following PEP-257. · deea36f0
      Fabián Ezequiel Gallina authored
      * lisp/progmodes/python.el (python-docstring-at-p): Remove function.
      (python-info-assignment-statement-p): New function.
      (python-info-assignment-continuation-line-p): Use it.
      (python-info-docstring-p): New function.
      (python-font-lock-syntactic-face-function)
      (python-fill-string): Use it.
      
      * test/automated/python-tests.el (python-info-assignment-statement-p-1)
      (python-info-assignment-statement-p-2)
      (python-info-assignment-statement-p-3, python-info-docstring-p-1)
      (python-info-docstring-p-2, python-info-docstring-p-3)
      (python-info-docstring-p-4, python-info-docstring-p-5)
      (python-info-docstring-p-6): New tests.
      deea36f0
  14. 07 Feb, 2015 2 commits
    • Fabián Ezequiel Gallina's avatar
      python.el: Keep eldoc visible while typing args. · 2155973e
      Fabián Ezequiel Gallina authored
      Fixes: debbugs:19637
      
      * lisp/progmodes/python.el (python-eldoc--get-symbol-at-point): New
      function.
      (python-eldoc--get-doc-at-point, python-eldoc-at-point): Use it.
      
      * test/automated/python-tests.el
      (python-eldoc--get-symbol-at-point-1)
      (python-eldoc--get-symbol-at-point-2)
      (python-eldoc--get-symbol-at-point-3)
      (python-eldoc--get-symbol-at-point-4): New tests.
      2155973e
    • Fabián Ezequiel Gallina's avatar
      Fix hideshow integration. · 2d467a0f
      Fabián Ezequiel Gallina authored
      Fixes: debbugs:19761
      
      * lisp/progmodes/python.el
      (python-hideshow-forward-sexp-function): New function based on
      Carlos Pita <carlosjosepita@gmail.com> patch.
      (python-mode): Make `hs-special-modes-alist` use it and initialize
      the end regexp with the empty string to avoid skipping parens.
      
      * test/automated/python-tests.el
      (python-tests-visible-string): New function.
      (python-parens-electric-indent-1)
      (python-triple-quote-pairing): Fix indentation, move require calls.
      (python-hideshow-hide-levels-1)
      (python-hideshow-hide-levels-2): New tests.
      2d467a0f
  15. 30 Jan, 2015 2 commits
  16. 27 Jan, 2015 2 commits
    • Fabián Ezequiel Gallina's avatar
      fd4e65e4
    • Fabián Ezequiel Gallina's avatar
      python.el: New non-global state dependent indentation engine. · 5485e3e5
      Fabián Ezequiel Gallina authored
      Fixes: debbugs:18319
      Fixes: debbugs:19595
      
      * lisp/progmodes/python.el (python-syntax-comment-or-string-p): Accept
      PPSS as argument.
      (python-syntax-closing-paren-p): New function.
      (python-indent-current-level)
      (python-indent-levels): Mark obsolete.
      (python-indent-context): Return more context cases.
      (python-indent--calculate-indentation)
      (python-indent--calculate-levels): New functions.
      (python-indent-calculate-levels): Use them.
      (python-indent-calculate-indentation, python-indent-line):
      (python-indent-line-function): Rewritten to use new API.
      (python-indent-dedent-line): Simplify logic.
      (python-indent-dedent-line-backspace): Use `unless`.
      (python-indent-toggle-levels): Delete function.
      
      * test/automated/python-tests.el (python-indent-pep8-1)
      (python-indent-pep8-2, python-indent-pep8-3)
      (python-indent-after-comment-1, python-indent-after-comment-2)
      (python-indent-inside-paren-1, python-indent-inside-paren-2)
      (python-indent-after-block-1, python-indent-after-block-2)
      (python-indent-after-backslash-1, python-indent-after-backslash-2)
      (python-indent-after-backslash-3, python-indent-block-enders-1)
      (python-indent-block-enders-2, python-indent-block-enders-3)
      (python-indent-block-enders-4, python-indent-block-enders-5)
      (python-indent-dedenters-1, python-indent-dedenters-2)
      (python-indent-dedenters-3, python-indent-dedenters-4)
      (python-indent-dedenters-5, python-indent-dedenters-6)
      (python-indent-dedenters-7, python-indent-dedenters-8): Fix tests.
      (python-indent-base-case, python-indent-after-block-3)
      (python-indent-after-backslash-5, python-indent-inside-paren-3)
      (python-indent-inside-paren-4, python-indent-inside-paren-5)
      (python-indent-inside-paren-6, python-indent-inside-string-1)
      (python-indent-inside-string-2, python-indent-inside-string-3)
      (python-indent-dedent-line-backspace-1): New Tests.
      5485e3e5
  17. 01 Jan, 2015 2 commits
  18. 27 Dec, 2014 4 commits
    • Fabián Ezequiel Gallina's avatar
      python.el: Native readline completion. · 2cb75922
      Fabián Ezequiel Gallina authored
      This commit adds native readline completion that fallbacks to the old
      mechanism when it cannot be used for the current interpreter.
      
      * lisp/progmodes/python.el (python-shell-completion-native-disabled-interpreters)
      (python-shell-completion-native-enable)
      (python-shell-completion-native-output-timeout): New defcustoms.
      (python-shell-completion-native-interpreter-disabled-p)
      (python-shell-completion-native-try)
      (python-shell-completion-native-setup)
      (python-shell-completion-native-turn-off)
      (python-shell-completion-native-turn-on)
      (python-shell-completion-native-turn-on-maybe)
      (python-shell-completion-native-turn-on-maybe-with-msg)
      (python-shell-completion-native-toggle): New functions.
      (python-shell-completion-native-get-completions): New function.
      (python-shell-completion-at-point): Use it.
      
      * test/automated/python-tests.el
      (python-shell-completion-native-interpreter-disabled-p-1): New
      test.
      2cb75922
    • Fabián Ezequiel Gallina's avatar
      python.el: Enhance shell user interaction and deprecate python-shell-get-or-create-process. · 7d1e62d5
      Fabián Ezequiel Gallina authored
      * lisp/progmodes/python.el
      (python-shell-get-process-or-error): New function.
      (python-shell-with-shell-buffer): Use it.
      (python-shell-send-string, python-shell-send-region)
      (python-shell-send-buffer, python-shell-send-defun)
      (python-shell-send-file, python-shell-switch-to-shell): Use it.
      Add argument MSG to display user-friendly message when no process
      is running.
      (python-shell-switch-to-shell): Call pop-to-buffer with NORECORD.
      (python-shell-make-comint): Rename argument SHOW from POP.  Use
      display-buffer instead of pop-to-buffer.
      (run-python): Doc fix.  Return process.
      (python-shell-get-or-create-process): Make obsolete.
      
      * test/automated/python-tests.el (python-shell-get-or-create-process-1)
      (python-shell-get-or-create-process-2)
      (python-shell-get-or-create-process-3): Remove tests.
      7d1e62d5
    • Fabián Ezequiel Gallina's avatar
      * lisp/progmodes/python.el (python-shell-buffer-substring): Handle · 433af0a0
      Fabián Ezequiel Gallina authored
      cornercase when region sent starts at point-min.
      433af0a0
    • Fabián Ezequiel Gallina's avatar
      python.el: Handle file encoding for shell. · 2dd5163d
      Fabián Ezequiel Gallina authored
      * lisp/progmodes/python.el (python-rx-constituents): Add coding-cookie.
      (python-shell--save-temp-file): Write file with proper encoding.
      (python-shell-buffer-substring): Add coding cookie for detected
      encoding to generated content.  Fix blank lines when removing
      if-name-main block.
      (python-shell-send-file): Handle file encoding.
      (python-info-encoding-from-cookie)
      (python-info-encoding): New functions.
      
      * test/automated/python-tests.el (python-shell-buffer-substring-1)
      (python-shell-buffer-substring-2, python-shell-buffer-substring-3)
      (python-shell-buffer-substring-4, python-shell-buffer-substring-5)
      (python-shell-buffer-substring-6, python-shell-buffer-substring-7)
      (python-shell-buffer-substring-8)
      (python-info-encoding-from-cookie-1)
      (python-info-encoding-from-cookie-2)
      (python-info-encoding-from-cookie-3)
      (python-info-encoding-from-cookie-4)
      (python-info-encoding-from-cookie-5)
      (python-info-encoding-from-cookie-6)
      (python-info-encoding-from-cookie-7, python-info-encoding-1)
      (python-info-encoding-2): New tests.
      2dd5163d
  19. 26 Dec, 2014 1 commit
    • Fabián Ezequiel Gallina's avatar
      python.el: Generate clearer shell buffer names. · 7284a174
      Fabián Ezequiel Gallina authored
      * lisp/progmodes/python.el (python-shell-get-process-name)
      (python-shell-internal-get-process-name): Use `buffer-name`.
      (python-shell-internal-get-or-create-process): Simplify.
      
      * test/automated/python-tests.el (python-shell-get-process-name-1)
      (python-shell-internal-get-process-name-1): Cleanup.
      (python-shell-get-process-name-2)
      (python-shell-internal-get-process-name-2): New tests.
      (python-shell-calculate-command-1)
      (python-shell-calculate-process-environment-3)
      (python-shell-calculate-exec-path-2, python-shell-make-comint-1)
      (python-shell-make-comint-2, python-shell-make-comint-4)
      (python-shell-get-process-1, python-util-clone-local-variables-1):
      Replace obsolete function and variable references with current.
      7284a174
  20. 22 Dec, 2014 1 commit
    • Fabián Ezequiel Gallina's avatar
      python.el: Fix electric colon behavior · 749813e9
      Fabián Ezequiel Gallina authored
      * lisp/progmodes/python.el (python-indent-post-self-insert-function):
      Make colon to re-indent only for dedenters, handling
      multiline-statements gracefully.
      
      * test/automated/python-tests.el (python-indent-electric-colon-2)
      (python-indent-electric-colon-3): New tests.
      749813e9
  21. 22 Nov, 2014 1 commit
    • Fabián Ezequiel Gallina's avatar
      Set PYTHONUNBUFFERED on shell startup. · 238c052f
      Fabián Ezequiel Gallina authored
      Fixes: debbugs:18595
      
      * lisp/progmodes/python.el (python-shell-unbuffered): New var.
      (python-shell-calculate-process-environment): Use it.
      
      * test/automated/python-tests.el
      (python-shell-calculate-process-environment-4)
      (python-shell-calculate-process-environment-5): New tests.
      (python-shell-make-comint-3): Use file-equal-p.
      (python-shell-get-or-create-process-1)
      (python-shell-get-or-create-process-2)
      (python-shell-get-or-create-process-3): Fix interpreter for
      Windows.
      238c052f
  22. 17 Nov, 2014 1 commit
  23. 16 Nov, 2014 1 commit
    • Fabián Ezequiel Gallina's avatar
      * lisp/progmodes/python.el (python-shell-calculate-command): Rename · 6f167f95
      Fabián Ezequiel Gallina authored
      from python-shell-parse-command.  Cleanup.
      (run-python, run-python-internal): Use it.
      (python-shell-calculate-pythonpath): Rename from
      python-new-pythonpath.
      (python-shell-calculate-process-environment): Use it.
      (python-shell-calculate-exec-path): Add comment.
      
      * test/automated/python-tests.el
      (python-shell-calculate-process-environment-2): Fix test.
      (python-shell-calculate-process-environment-1)
      (python-shell-calculate-process-environment-3): Cleanup.
      6f167f95
  24. 15 Nov, 2014 2 commits
    • Fabián Ezequiel Gallina's avatar
      Fixes: debbugs:18432 · 92f58578
      Fabián Ezequiel Gallina authored
      * lisp/progmodes/python.el (python-indent-calculate-levels): Fix
      indentation behavior multiline dedenter statement.
      
      * test/automated/python-tests.el (python-indent-dedenters-8): New test
      for Bug#18432.
      92f58578
    • Fabián Ezequiel Gallina's avatar
      Fix region indentation · 89ebffc1
      Fabián Ezequiel Gallina authored
      Fixes: debbugs:18843
      
      * lisp/progmodes/python.el (python-indent-region): Use
      python-indent-line and skip special cases.
      
      * test/automated/python-tests.el (python-indent-region-1)
      (python-indent-region-2, python-indent-region-3)
      (python-indent-region-4, python-indent-region-5): New tests.
      89ebffc1
  25. 01 Sep, 2014 1 commit
  26. 18 Aug, 2014 1 commit
  27. 21 Jul, 2014 1 commit
  28. 20 Jul, 2014 1 commit
    • Fabián Ezequiel Gallina's avatar
      Make python.el work with IPython automatically. · b06a0dff
      Fabián Ezequiel Gallina authored
      * lisp/progmodes/python.el:
      (python-shell-completion-setup-code): New value supporting iPython.
      (python-shell-completion-string-code): New value supporting iPython.
      (python-shell-completion-get-completions): Use them.
      (python-shell-completion-module-string-code): Make obsolete.
      (python-shell-prompt-input-regexps)
      (python-shell-prompt-output-regexps): Add safeguard for ipdb.
      (python-shell-output-filter): Fix comment typo.
      
      * test/automated/python-tests.el:
      (python-util-clone-local-variables-1): Fix test.
      
      Fixes: debbugs:15510
      b06a0dff
  29. 19 Jul, 2014 1 commit
    • Fabián Ezequiel Gallina's avatar
      Autodetect Python shell prompts. · d949ade3
      Fabián Ezequiel Gallina authored
      * lisp/progmodes/python.el:
      (python-shell-interpreter-interactive-arg)
      (python-shell-prompt-detect-enabled)
      (python-shell-prompt-detect-failure-warning)
      (python-shell-prompt-input-regexps)
      (python-shell-prompt-output-regexps): New vars.
      (python-shell-prompt-calculated-input-regexp)
      (python-shell-prompt-calculated-output-regexp): New vars.
      (python-shell-get-process-name)
      (python-shell-internal-get-process-name)
      (python-shell-output-filter)
      (python-shell-completion-get-completions): Use them.
      (python-shell-prompt-detect)
      (python-shell-prompt-validate-regexps): New functions.
      (python-shell-prompt-set-calculated-regexps): New function.
      (inferior-python-mode): Use it.  Also honor overriden
      python-shell-interpreter and python-shell-interpreter-args.
      (python-shell-make-comint): Honor overriden
      python-shell-interpreter and python-shell-interpreter-args.
      (python-shell-get-or-create-process): Make it testable by allowing
      to call run-python non-interactively.
      (python-util-valid-regexp-p): New function.
      (python-shell-prompt-regexp, python-shell-prompt-block-regexp)
      (python-shell-prompt-output-regexp)
      (python-shell-prompt-pdb-regexp): Use it as defcustom :safe.
      
      * test/automated/python-tests.el (python-shell-make-comint-1):
      (python-shell-make-comint-2): Fix indentation.
      (python-shell-make-comint-3)
      (python-shell-make-comint-4): New tests.
      (python-shell-get-or-create-process-1): Fix test.
      (python-shell-get-or-create-process-2)
      (python-shell-get-or-create-process-3): New tests.
      (python-shell-internal-get-or-create-process-1): Fix test.
      (python-shell-prompt-detect-1): New test.
      (python-shell-prompt-detect-2): New test.  (Bug#17370)
      (python-shell-prompt-detect-3)
      (python-shell-prompt-detect-4)
      (python-shell-prompt-detect-5)
      (python-shell-prompt-detect-6)
      (python-shell-prompt-validate-regexps-1)
      (python-shell-prompt-validate-regexps-2)
      (python-shell-prompt-validate-regexps-3)
      (python-shell-prompt-validate-regexps-4)
      (python-shell-prompt-validate-regexps-5)
      (python-shell-prompt-validate-regexps-6)
      (python-shell-prompt-validate-regexps-7)
      (python-shell-prompt-set-calculated-regexps-1)
      (python-shell-prompt-set-calculated-regexps-2)
      (python-shell-prompt-set-calculated-regexps-3)
      (python-shell-prompt-set-calculated-regexps-4)
      (python-shell-prompt-set-calculated-regexps-5)
      (python-shell-prompt-set-calculated-regexps-6)
      (python-util-valid-regexp-p-1): New tests.
      d949ade3
  30. 09 Jul, 2014 1 commit
    • Fabián Ezequiel Gallina's avatar
      Fix dedenters and electric colon handling. · fded0b4a
      Fabián Ezequiel Gallina authored
      * lisp/progmodes/python.el
      (python-rx-constituents): Add dedenter and block-ender.
      (python-indent-dedenters, python-indent-block-enders): Delete.
      (python-indent-context): Return new case for dedenter-statement.
      (python-indent-calculate-indentation): Handle new case.
      (python-indent-calculate-levels): Fix levels calculation for
      dedenter statements.
      (python-indent-post-self-insert-function): Fix colon handling.
      (python-info-dedenter-opening-block-message): New function.
      (python-indent-line): Use it.
      (python-info-closing-block)
      (python-info-closing-block-message): Remove.
      (python-info-dedenter-opening-block-position)
      (python-info-dedenter-opening-block-positions)
      (python-info-dedenter-statement-p): New functions.
      
      * test/automated/python-tests.el
      (python-indent-block-enders-1)
      (python-indent-block-enders-2): Fix tests.
      (python-indent-block-enders-3)
      (python-indent-block-enders-4)
      (python-indent-block-enders-5)
      (python-indent-dedenters-1)
      (python-indent-dedenters-2): Remove tests.
      (python-indent-dedenters-1)
      (python-indent-dedenters-2)
      (python-indent-dedenters-3)
      (python-indent-dedenters-4)
      (python-indent-dedenters-5)
      (python-indent-dedenters-6)
      (python-indent-dedenters-7)
      (python-info-dedenter-opening-block-position-1)
      (python-info-dedenter-opening-block-position-2)
      (python-info-dedenter-opening-block-position-3)
      (python-info-dedenter-opening-block-positions-1)
      (python-info-dedenter-opening-block-positions-2)
      (python-info-dedenter-opening-block-positions-3)
      (python-info-dedenter-opening-block-positions-4)
      (python-info-dedenter-opening-block-positions-5)
      (python-info-dedenter-opening-block-message-1)
      (python-info-dedenter-opening-block-message-2)
      (python-info-dedenter-opening-block-message-3)
      (python-info-dedenter-opening-block-message-4)
      (python-info-dedenter-opening-block-message-5)
      (python-info-dedenter-statement-p-1)
      (python-info-dedenter-statement-p-2)
      (python-info-dedenter-statement-p-3)
      (python-info-dedenter-statement-p-4)
      (python-info-dedenter-statement-p-5): New tests.
      
      Fixes: debbugs:15163
      fded0b4a